Can I clear a webapp in Chrome?

Web ApplicationsGoogle ChromeManifest

Web Applications Problem Overview


I've written a webapp that has a manifest that includes all the javascript and images that it requires. Unfortunately, even when I change the manifest file, it doesn't seem to reload the javascript.

Is there a way to delete the webapp completely from Chrome? Clearing the browser cache doesn't seem to work.

I'm running Chrome 5.0.375.55 on a Mac.

Any help very gratefully received.

Web Applications Solutions


Solution 1 - Web Applications

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 :)

Solution 2 - Web Applications

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.

Solution 3 - Web Applications

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();

Solution 4 - Web Applications

No (as far as I know)

It seems that people want the questioner to accept an answer, but no one has actually answered the question. I am no expert, but I have been searching a lot, and I think "No" is correct, and answers the question as posed.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionacuthView Question on Stackoverflow
Solution 1 - Web ApplicationsdigitaldonkeyView Answer on Stackoverflow
Solution 2 - Web ApplicationsDave KasperView Answer on Stackoverflow
Solution 3 - Web ApplicationsWhitView Answer on Stackoverflow
Solution 4 - Web ApplicationsDaveWalleyView Answer on Stackoverflow