[🐞] service-worker.js
contains appBundles
that triggers reinstall of SW when app update and vanishes cached contents generated at client side.
#7231
Labels
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
I am writing a somewhat larger app that has about 30k LOC with Qwik.
The app uses cache storage for caching generated blobs at the client side.
When I updated the app, I found the all cached contents triggers 404 not found even if they had been cached previously.
Many of browsers tend to delete the caches have "Response type = default" (it means generated in client side) when the SW is re-installed.
The reason this happen is the SW consists of import directives of app bundles at the beginning of its code like this:
The hashes of app bundles are changed even if one of them has been modified, so thus we experience the reinstall of the SW for every app updates.
Expected behaviour is the SW is not re-installed when the app is updated, except the SW itself has been modified.
The reinstall expires the cached content that is cached by previous era of the SW.
I think the
appBundles
can be fetched dynamically instead of being embedded.Reproduction
couldn't be supplied
Steps to reproduce
No response
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: