Precached page '/' not updating after new build is deployed
See original GitHub issueRecently this problem appeared in our pwa. I had all default settings in workbox
pwa module and everything worked fine, but now it seems root page (/) is precached, it is exists in CacheStorage workbox-precache-v2-...
After unregistering manually service worker this problem is gone, but only for the time before next page reload.
I can solve issue by manually deleting this CacheStorage, but it’s not the solution because our users won’t do it manually.
Question is, by which way sw can force delete this cache for all users ? Or is there a way to disable precache of this page? Maybe there is another way to solve this?
Also we have cloudflare cache, could it be a problem?
Also have this warning: Workbox is precaching URLs without revision info: /
but updated pwa-module to the latest version.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:9 (5 by maintainers)
I also encountered this problem. I’ve read through source code and I don’t think it’s possible to fix it by ourselves - array of precached resources is built from webmanifest config and some defaults, which include
/
route.Google docs say, that
cache-first
policy is used for precached resources, that’s why page is not refreshed. Precached resources are updated once service worker is, only if revision changes. And because no revision is used, it’s not updating.Maybe some randomized revision would help?
Problem is, that we may get some non-deterministic behavior - service worker is not updated immadietely, when you open the page. It may take some time, especially if you have other tabs open, that it controls. So you would get the old version until the service worker is running.
It would be nice to be able to fine-tune precaching, so we’d be able to remove
/
from precached resources.Hi. This issue should be gone with 3.3.0.