Search code examples
htmlgoogle-chromehttp-headershtml5-appcache

AppCache does not swap index.html


I have been using appcache with an unchanged index.html for quite some time. It was not explicitly listed in the manifest, but cached anyway as a master entry.

Now index.html changes and I'm running into this problem:

All resources are fetched and cached properly, however the master entry remains old and the website breaks. I tried listing index.html explicitly in the manifest. Chrome devtools shows the dilemma very well:

Chrome devtools

The old index.html remains as master. The new one gets cached explicitly but doesn't swap.

This error happens as described in Chrome. FF and Safari work fine. IE 11 displays "Resource doesn’t exist on the server" and "Appcache Fatal Error".

The manifest looks like this:

CACHE MANIFEST
# vX.X.X

NETWORK:
*

CACHE:

index.html
app.js
app.json
favicon.ico
... (+100 more files)

Solution

  • Found it:

    To fix a framework bug, I had a server-side redirect to add a query string param. Swapping the appcache from https://example.com to https://example.com?myparam broke the appcache in Chrome and IE.