media-experiments icon indicating copy to clipboard operation
media-experiments copied to clipboard

Investigate cache issues

Open swissspidy opened this issue 1 year ago • 5 comments

If vips.worker.js is strongly cached in the browser there can be issues. Investigate how to best clear that cache.

swissspidy avatar May 15 '24 15:05 swissspidy

Maybe can append __webpack_hash__ somewhere?

swissspidy avatar Jul 26 '24 10:07 swissspidy

In PR #603, I did this for *.wasm files: https://github.com/swissspidy/media-experiments/blob/7f2c098521277978f48f38dcfe0f6528836e04b9/webpack.config.js#L104-L105

A similar approach can be done here: https://github.com/swissspidy/media-experiments/blob/809cf55943abbe10882f02d82794c82318765115/webpack.config.js#L54

However, this will append a hash to all JavaScript files, including media-experiments.js, which may not be very useful.

kleisauke avatar Aug 09 '24 10:08 kleisauke

I wanted to pass a function for chunkFileName in the past, but this is blocked by https://github.com/Shopify/quilt/issues/2807

swissspidy avatar Aug 09 '24 10:08 swissspidy

Issue https://github.com/Shopify/quilt/issues/2807 has been resolved via PR https://github.com/Shopify/quilt/pull/2816 and #701, but unfortunately, Quilt is no longer maintained, and all its packages have been deprecated. :man_shrugging:

kleisauke avatar Oct 10 '24 14:10 kleisauke

That's not the good-news-bad-news combo I was expecting. 😢

Guess I'll need to look for alternatives... 😕

Edit:

At least the underlying rpc package is not deprecated, see https://github.com/Shopify/remote-dom/tree/remote-ui/packages/rpc

swissspidy avatar Oct 10 '24 14:10 swissspidy