3 ms·
So to "warm the cache" you're basically going to have a list of files that need to be prefetched. Also, in case the network is offline, you need fallbacks for c
by bad_user 15y ago
So to "warm the cache" you're basically going to have a list of files that need to be prefetched. Also, in case the network is offline, you need fallbacks for certain unavailable resources.
So why not have a standard mechanism for this that doesn't clutter the HTTP protocol?
There is a difference between Cache-Control and this offline-cache ... Cache-Control specifies an expiry date (that has to make sense even if you're permanently online, as in you can't put an expiry of 1 month if articles may be updated in far less than that), while the offline cache gets invalidated only when you update the manifest and thus provides an easier to deal with mechanism for the distribution of new versions.
I agree with the above comment that you can't really abstract offline away. Offline is offline. People may stay offline from a couple of hours to a whole month and your app has to still function in that period of time - think of Google Reader - personally I like having favorite articles copied locally when I'm going on vacation, but roaming costs are too much for my data plan and I'm definitely turning the net off. So the app has to cache these articles for an indefinite period, but it has to update as soon as I get online (preferably only things that got updated).
- AffableSpatula 15y agoYour app should already have fallbacks for 'certain unavailable resources'. I don't think this does clutter the HTTP, in fact the proposal even provides an alternative to the one single addition it does make to HTTP. I'm not clear on the other points you've made, sorry