Can I clear a webapp in Chrome? Can I clear a webapp in Chrome? google-chrome google-chrome

Can I clear a webapp in Chrome?


Adding a get parameter like ?foo=12345 will treat your file as a different one and therefore recache it, but NOT clear any cache for the existing file.

Type:

chrome://appcache-internals/

and you'll get Lucky :)


Is it cached server side as well? Try adding a get parameter like ?foo=12345 to the url and see if you get the updated file.


Apple has some really good documentation on this, it is a bit tricky to get going but it does make the whole manifest process way more transparent. In addition, I find Safari (esp. Mobile Safari) shows these event responses more consistently than Firefox; not sure about Chrome though it should be pretty close to Safari.

The root of your question though:

  1. Empty the manifest or add/remove a file to the manifest
  2. load the app
  3. re-add the manifest
  4. Re-load app. This is dirty way but I recommend taking the time to read though and implement the JS and so you can see for sure the manifest is getting updated.

Google has a good post here.

Basically you can build a series of if else tests with the window.applicationCache.status for a clear look at what the system is doing.

From Apple:

For example, you get the DOMApplicationCache object as follows:

cache = window.applicationCache;

You can check the status of the application cache as follows:

if (window.applicationCache.status == window.applicationCache.UPDATEREADY)...

If the application cache is in the UPDATEREADY state, then you can update it by sending it the update() message as follows:

window.applicationCache.update();

If the update is successful, swap the old and new caches as follows:

window.applicationCache.swapCache();