RESOLVED INVALID 42051
browser cache and webkit cache used for resources listed as fallback and/or network in cache manifest file.
https://bugs.webkit.org/show_bug.cgi?id=42051
Summary browser cache and webkit cache used for resources listed as fallback and/or n...
Lyon Chen
Reported 2010-07-11 18:35:33 PDT
When loading resources listed in fallback and/or network sections in a cache manifest file, we use webkit cache and browser cache, which could result in wrong resource used when online status changed during a browser session: Steps to reproduce: 1. load http://htmltest.freetzi.com/fallback/index.html; 2. the image should display "online"; 3. remove all network connection; 4. open a new tab and load http://htmltest.freetzi.com/fallback/index.html; 5. the image should display "offline", but it shows "online". The reason is when we loading online.gif for the new tab, it doesn't check whether it's a fallback resource before we load it from webkit cache. Another aspect of this issue is, we can also load fallback/network resources from browser cache, so we also need to make every load of fallback/network resources with cache policy of CachePolicyReload/ReloadIgnoringCacheData.
Attachments
patch for 42051 (4.35 KB, patch)
2010-07-11 18:42 PDT, Lyon Chen
no flags
patch for 42051 (5.71 KB, patch)
2010-07-11 21:54 PDT, Lyon Chen
ap: review-
Lyon Chen
Comment 1 2010-07-11 18:42:36 PDT
Created attachment 61184 [details] patch for 42051
Lyon Chen
Comment 2 2010-07-11 21:54:24 PDT
Created attachment 61190 [details] patch for 42051 Updated with dummy implementation of ApplicationCacheHost::isFallbackOrNetworkResource() for Chromium port, which don't need it except for compiling purpose.
Alexey Proskuryakov
Comment 3 2010-07-12 11:52:15 PDT
Say, there is an offline app for an image gallery, and it loads images from network, having the URLs in NETWORK section. Surely we don't want to bypass network loader cache for these, and the behavior you describe is better than the alternative. When I last looked at the spec, it didn't say that we should bypass caches. If you think that would be a better behavior, it should probably be incorporated in the spec first.
Lyon Chen
Comment 4 2010-07-12 12:18:13 PDT
(In reply to comment #3) > When I last looked at the spec, it didn't say that we should bypass caches. If you think that would be a better behavior, it should probably be incorporated in the spec first. Yeah, I agree there's no specific mentioning bypass user agent specific caches like webkit cache and webkit client application cache in the spec, but I do think without bypassing all these caches, we will give these web applications a wrong information that it's still online, while it is not, as shown my reproduce steps listed above.
Alexey Proskuryakov
Comment 5 2010-07-12 12:29:17 PDT
A Web application can always serve the resource with pragma no-store to prevent caching if that's the way it discovers the "online" state. Re-reading comment 3, I think that it can be misread, so to avoid confusion, my position is that the current behavior is preferable. If you would like to change it, I think that the best thing to do would be to e-mail WHATWG or W3C HTMLWG mailing list, asking for a clarification and a possible spec change.
Lyon Chen
Comment 6 2010-07-12 12:42:59 PDT
(In reply to comment #5) > If you would like to change it, I think that the best thing to do would be to e-mail WHATWG or W3C HTMLWG mailing list, asking for a clarification and a possible spec change. Good suggestion, will ask for clarification on this.
Lyon Chen
Comment 7 2010-07-13 10:25:28 PDT
(In reply to comment #6) Based on comments above by Alexey Proskuryakov, and comments in webkit-dev and whatwg@lists.whatwg.org, I agree this bug is not valid. Offline web application should use cache-control if they want to make sure the resources in fallback list are from original server.
Note You need to log in before you can comment on or make changes to this bug.