It seems that once you have a manifest entry, a la:
Then that page (the master entry in the cache) wil
Ive been researching the same question, and it doesnt appear to be an api to:
Here are the best resources I have found:
http://www.html5rocks.com/tutorials/appcache/beginner/
http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone
In particular, this quote from the first link:
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.
Otherwise, there is no mention anywhere about unloading the cache.
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.
In google chrome, the user can go to the following URL:
chrome://appcache-internals/
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.
If you look at the specification:5.6 Offline Web applications
It seems to suggest a situation where the cache is removed. Specifically, section 5.6.4.5:
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.
It then says:
If this was a cache attempt, discard cache group altogether.
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?).