Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ive been researching the same question, and it doesnt appear to be an api to:</p> <ol> <li>dynamically trigger that a page is cached</li> <li>dynamically cause a page to stop being cached.</li> </ol> <p>Here are the best resources I have found:</p> <p><a href="http://www.html5rocks.com/tutorials/appcache/beginner/">http://www.html5rocks.com/tutorials/appcache/beginner/</a></p> <p><a href="http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone">http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone</a></p> <p>In particular, this quote from the first link:</p> <blockquote> <p>If the manifest file or a resource specified in it fails to download, the entire update fails. The browser will continue to use the old application cache in the event of such a failure.</p> </blockquote> <p>Otherwise, there is no mention anywhere about unloading the cache.</p> <p>Seems to suggest that you cant force an error to get it to uncache. However, as noted below, the spec suggests that if an error occurs while downloading the manifest file, the entire cache will be removed.</p> <p>In google chrome, the user can go to the following URL:</p> <p><a href="http://chrome://appcache-internals/">chrome://appcache-internals/</a></p> <p>And manually disable the cache. Of course, the next time they visit the page, it will be recached if the page has the manifest property set.</p> <p>If you look at the specification:<a href="http://www.w3.org/TR/html5/offline.html#concept-appcache-cache">5.6 Offline Web applications</a></p> <p>It seems to suggest a situation where the cache is removed. Specifically, section 5.6.4.5:</p> <blockquote> <p>If fetching the manifest fails due to a 404 or 410 response or equivalent, then run these substeps: Mark cache group as obsolete. This cache group no longer exists for any purpose other than the processing of Document objects already associated with an application cache in the cache group. If cache group has an application cache whose completeness flag is incomplete, then discard that application cache.</p> </blockquote> <p>It then says:</p> <blockquote> <p>If this was a cache attempt, discard cache group altogether.</p> </blockquote> <p>Basically, if the request for the cache manifest file results in a 404, then the entire cache should be discarded. So, have you tried to have the server return a 404 or 410 when the cache manifest file is requested? That should work. The trick is to only return the 404 / 410 for the pages you want to remove the manifest from (perhaps using url parameters?).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload