28

I have an HTML document with an associated appcache manifest. But now I want to get rid of offline application caching for a while.

If I remove mention of the manifest from the <html> tag, browsers that already have a cached version will continue to use that cached version.

If I update the appcache manifest, well, whatever, there is still an appcache.

What is the most sensible way to go about removing offline application caching? I suppose that I could just change the manifest to have no entries other than:

NETWORK:
*

Then it won't actually cache anything.

But surely there must be a way to get rid of the appcache and the manifest file altogether, no?

Trott
  • 66,479
  • 23
  • 173
  • 212
  • possible duplicate of [Removing HTML5 Appcache Manifest, Permanently](http://stackoverflow.com/questions/8815280/removing-html5-appcache-manifest-permanently) – Kyle Trauberman Jul 31 '12 at 18:11
  • 4
    @KyleTrauberman This question was asked on October 29, 2011. The duplicate you suggest was asked this year (2012), after this question was asked. – Trott Jul 31 '12 at 18:40
  • 2
    interesting. I didn't select it, it was automatically suggested by the new beta review system. It looked like a good match, so I voted on it. – Kyle Trauberman Jul 31 '12 at 18:45

4 Answers4

31

You simply need to remove the appcache manifest from your server. If the browser can't access the manifest file, it will stop caching your app and remove all cached data.

Some useful information from two sites:

If the manifest file itself can't be retrieved, the cache will ignored and all cached data associated with it will be disregarded.

http://appcache.offline.technology/

Application caches can also become obsolete. If the manifest is removed from the server, the browser removes all application caches that use that manifest, then sends an "obsoleted" event to the application cache object. Then the application cache's status is set to OBSOLETE.

https://developer.mozilla.org/en/Offline_resources_in_Firefox

Daan
  • 1,516
  • 12
  • 20
  • 2
    after deleting it, you can test for it with this line of js; when the 404 from the deleted manifest returns, this is fired off: appCache.addEventListener('obsolete', handleCacheEvent, false); – albert Oct 29 '11 at 20:55
  • maybe you could help me? http://stackoverflow.com/questions/9287044/my-html5-application-cache-manifest-is-caching-everything – Neo Feb 15 '12 at 03:26
  • 1
    This didn't work in Firefox for me. Firefox continued to use the cached appcache when it received a 404. Solution here: http://stackoverflow.com/a/31083156/119975 – Gregory Cosmo Haun Jun 26 '15 at 22:42
  • This answer is incorrect, the correct solution is detailed here: https://stackoverflow.com/a/62587655/806876 – pygeek Jun 26 '20 at 03:41
21

FOR anyone coming across this question and who've deleted the appcache manifest, deleted the browser's cache and removed the manifest from the server and the reference to it in the HTML: If this still did not cause your HTML document to load the update version in Google Chrome, you can go to chrome://appcache-internals/ in your browser and click REMOVE next to the manifest you wish to get rid of.

Trevor Prime
  • 293
  • 1
  • 3
  • 7
  • 3
    The only situation I can imagine this happening in is if you have not set the conventional HTTP cache expiration for your manifest to immediate expiration. Also, and minor point perhaps, but this answer isn't really an answer to the question asked. It's an answer to "how do I remove it from my browser", not how to remove it for everyone who visits my site. Still, very useful info for Chrome users! – Trott Dec 28 '12 at 20:51
6

Manually delete app cache: Only for Chrome

Enter the follow URL in your chrome browser: chrome://appcache-internals/

There you will see a list of every application cache you have in storage with the possibility to remove any of them.

Reference

coder
  • 1,874
  • 2
  • 22
  • 31
2

In modern Firefox you can manipulate the offline cache with Edit Preferences Advanced Network.

In windows it is now (v27.01) Tools Options Advanced Network

JohnP
  • 49,507
  • 13
  • 108
  • 140
Sciurius
  • 53
  • 5