Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing HTML5 Offline AppCache

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?

like image 532
Trott Avatar asked Oct 29 '11 08:10

Trott


People also ask

Is AppCache deprecated?

AppCache is documented as deprecated and under removal in MDN and in the WHATWG standard, and marked as obsolete in W3C's HTML 5.1. It is incompatible with CORS, making it unfriendly for usage with CDNs.

What is the purpose of AppCache API in HTML5?

The Application Cache (or AppCache) allows a developer to specify which files the browser should cache and make available to offline users. Your app will load and work correctly, even if the user presses the refresh button while they're offline.

What allows HTML5 application to work in an offline state?

Offline web applications are available through the new HTML Offline Web Application API, also known as HTML Application Cache. Beyond simply serving pages to the user when an Internet connection is unavailable, often an offline application requires storage of user's information.

What is HTML cache?

Application Cache in HTML5: The current version of HTML5 introduces application cache, which means that a web application is cached, and accessible without an internet connection. Now we can make an offline web application that will run without an internet connection by just creating a manifest file in our application.


1 Answers

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

like image 164
Daan Avatar answered Oct 06 '22 14:10

Daan