Skip to content

Comment on The HTML5 appcache is the New Bootloaderparent

Comments

Yes, that's standard deployment practice, but unfortunately with appcache, nothing links index.html to any specific version of the manifest. You can't even query it to see what version of the manifest you have. So you can end up with index.html trying to include a script of hashv1.js, but manifest has hashv2.js.

This can happen if clients are updating to app version 2 just as you are deploying v3. It's totally racy.

EDIT: I have a python script that proves it. It basically does new deployments (using only new, versioned .js files) while the browser reloads. I will be updating the post in the near future.

EDIT: Post updated with the test script and screenshot of what blows up.

what if the manifest.appcache is content addressable ? e.g. manifest-[version-number].appcache the appcache semantics are convoluted enough that I must admit I don't know what would happen. Would you visit index.html and it loads the old version of index.html linking to the old version of the cache manifest-- forever?

Perhaps the old version of the manifest gets a comment incremented to force the browser to update index.html? or some tricky javascript forces it? Either way it seems, naively like you could link an index.html version to a manifest version via the manifest's filename.

I see what you mean. But, at this point I'm not really interested in dicking around with it any more :-)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.