Do we need to add "cleanupOutdatedCaches: true" #122
-
When we deploy an update, I think I need to refresh the page several time before the updated data is loaded properly. Does adding "cleanupOutdatedCaches: true" in "workbox" will help us achieve the immediate auto update without refreshing the page? Currently we don't specify the prop: openivity.github.io/vite.config.ts Lines 29 to 39 in e305f58 In this documentation, https://vite-pwa-org.netlify.app/guide/auto-update.html#cleanup-outdated-caches, says it's enabled by default, but in code doc it says otherwise: false. 😢 Any idea @raditzlawliet ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hmm... I check out the web is have max-cache: 600. And every time we build, it always re-generate file with new name. That's why it should be fine for usual web. But currently we use PWA to make cache and can be access when offline. Try that options manually set |
Beta Was this translation helpful? Give feedback.
Hmm... I check out the web is have max-cache: 600. And every time we build, it always re-generate file with new name. That's why it should be fine for usual web.
But currently we use PWA to make cache and can be access when offline.
I re-read again, we need to add them unless if we're using
generateSW
strategy.Try that options manually set
true
.I also read something about background sync configuration, may can help https://vite-pwa-org.netlify.app/workbox/generate-sw