1
votes

I have a Webapp that uses the application cache for offline and online access. The problem I'm running into is that some of my users are not seeing updates when I change the manifest file. It works for me and for others, so my only theory is that some ISPs are caching the manifest file.

Has anyone else encountered this?

I don't know of any way to programmatically flush the browser application cache to force the update. window.applicationCache.update() does not seem to do the trick (at least on iPad). The usual trick of adding queryies to the URLs probably would defeat offline behavior.

In desperation I could simply use an unchanging loader page and put all the code in localStorage and do my own updates.

1
What expiry headers are you sending with the manifest file? - robertc
Thanks! Would ExpiresByType text/cache-manifest "access plus 30 minutes" do the trick? What about the html, js, and images? Would this affect offline behavior? - srkleiman

1 Answers

0
votes

Normal practice is to expire the manifest file immediately, as per HTML5 Boilerplate:

ExpiresByType text/cache-manifest       "access plus 0 seconds"

Firefox in particular is known to have issues with caching the manifest file if it is not explicitly expired. The HTML5 Boilerplate file linked to above also has a load of sensible defaults for other file types.