3 ms·
We use a similar strategy for our HTML5-based IOS app, however the issue is that it might take a few seconds to realize that an error has occurred and the resou
by newhouseb 15y ago
We use a similar strategy for our HTML5-based IOS app, however the issue is that it might take a few seconds to realize that an error has occurred and the resource should be served stale, which pretty obnoxiously kills any responsiveness.
The ideal way to make this work is to allow requests to be loaded idempotent and thus you can serve a stale request first and then if a more recent version should come down from the server you can re-load that resource individually (say a feed request to your server or something). This of course requires more than just an HTTP header but it's a cleaner solution provided you can prove that loading of resources is idempotent.
- AffableSpatula 15y agoThe "cache-control extensions for stale content" provide stale-while-revalidate, which seems to cover that requirement