Question

I have noticed that a touch, or another modification of the manifest file's metadata will not trigger an update (at least when testing with Google Chrome). The browser will fire the noupdate event unless I change something more meaningful in the file, such as adding a line of whitespace.

How does the browser compare the old manifest against the new? Does it download the new manifest and compare it? Is it determined somehow from the file header?

Was it helpful?

Solution

http://diveintohtml5.info/offline.html includes a good explanation of the process that the browser follows when loading the manifest.

Briefly:

  • the server attempts to get a new copy of the manifest
  • if you have an old version, it will compare the content of the manifest file to the old manifest - so if your index page has changed, but you have no new files, it'll fire noupdate. Any change to the manifest contents, as trivial as adding whitespace (as you saw), will cause your listed assets to be redownloaded.
  • a common way to deal with this is to add a SHA or something as a comment to your manifest, generated in such a way that it'll change when any of the assets themselves change.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top