RESOLVED INVALID26421
resources not fetched when application cache is on
https://bugs.webkit.org/show_bug.cgi?id=26421
Summary resources not fetched when application cache is on
Yong Li
Reported 2009-06-15 15:31:18 PDT
When application cache is used, fetching some resources that are neither in the cache nor in application cache fallback URL list can be refused. As a result, the software doesn't show the list of checkboxes on http://static.webvm.net/appcache/todo.html bool DocumentLoader::shouldLoadResourceFromApplicationCache(const ResourceRequest& request, ApplicationCacheResource*& resource) { ApplicationCache* cache = applicationCache(); if (!cache || !cache->isComplete()) return false; // If the resource is not a HTTP/HTTPS GET, then abort if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request)) return false; // If the resource's URL is an master entry, the manifest, an explicit entry, a fallback entry, or a dynamic entry // in the application cache, then get the resource from the cache (instead of fetching it). resource = cache->resourceForURL(request.url()); // Resources that match fallback namespaces or online whitelist entries are fetched from the network, // unless they are also cached. if (!resource && (cache->urlMatchesFallbackNamespace(request.url()) || cache->isURLInOnlineWhitelist(request.url()))) return false; // Resources that are not present in the manifest will always fail to load (at least, after the // cache has been primed the first time), making the testing of offline applications simpler. return true; }
Attachments
Yong Li
Comment 1 2009-06-15 15:35:57 PDT
Possible solution? change the following code: if (!resource && (cache->urlMatchesFallbackNamespace(request.url()) || cache->isURLInOnlineWhitelist(request.url()))) return false; into: if (!resource || cache->urlMatchesFallbackNamespace(request.url()) || cache->isURLInOnlineWhitelist(request.url())) return false;
Anders Carlsson
Comment 2 2009-06-16 10:25:16 PDT
It's actually a feature not to fetch resources not listed in the manifest when using the application cache, see http://www.whatwg.org/specs/web-apps/current-work/#changesToNetworkingModel
Note You need to log in before you can comment on or make changes to this bug.