htmlcache-manifestofflineapps

HTML5 App Cache: Manifest ist updated but files are taken from appcache one more time


I have a cache manifest with a comment in it

# Version 3.2

in order to update all the App I simply change the Version number. It works, but:

When I update the manifest, everything is updated correctly (new cache is filled) but the actual files are taken ONE more time from the (old) cache. when I reload twice everything is updated. Is this behaviour correct? Using chrome 21.

Thanks


Solution

  • Yes, this is the current "correct" behaviour. This is what happens:

    When you just made changes to the manifest file, and you refresh the browser, this is what happens (assuming you're online)

    This is currently the standard behaviour. Some people put some event handlers to prompt the user to do another refresh (after the 1st refresh)

    Personally, I think the browser should be responsible to alert the user to make another refresh after finish downloading the new files, but right now, most people put in event handlers from the "window.applicationCache" to fire events to help manage this.

    To look at an example of using window.applicationCache, go here : http://www.html5rocks.com/en/tutorials/appcache/beginner/

    it's under the "Updating the Cache" section.