开发者

HTML5 applicationCache vs Browser Cache

With current applicationCache implemented in browsers, my appcache manifest file changes the version number which then triggers the applicationCache update event which forces browser to download fresh resources mentioned in the manifest files from the server.

Let's say I have configured far future expiry headers on those resources. Will those files sti开发者_StackOverflow中文版ll be downloaded? Or will be read from browser cache itself?

We implement a versioning based logic to invalidate browser caches (chaging the file name itself). I am wondering, with appcache in place, do we need a hybrid of versioning + applicationCache?


When you update the manifest file (actual change or a version comment) your browser will download every single file listed in the CACHE and FALLBACK sections. It's up to the browser to implement this how they see fit, but the better implementations out there will do it in smart ways. Current implementations do not all work in interoperable ways though. For example, browsers can check for HTTP code 304 "Not Modified" instead of blindly downloading the files.

Check out: http://appcachefacts.info/ --this one says that " If any [files listed in the CACHE section] are already in the browser's cache, they will not be downloaded again separately.

Seth Ladd (Google) wrote an interesting article about this: http://blog.sethladd.com/2010/10/proposal-to-enhance-html5-app-cache.html

Moe info: http://www.slideshare.net/peterlubbers/using-html5-application-cache-to-create-offline-web-applications

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜