-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workbox is not clearing the cache #1803
Comments
I have similar problem - the hash is updating and the worker is reloading correctly when it gets the new one, however the old file is still being served from the cache. Sometimes. This happens on safari mobile, chrome on linux, safari on ios... I have no clue how to go about debugging this unfortunately. I have server-side caching set for JS files but presumably given a hash update in __precacheManifest it should fetch with no http-level caching. |
I have the same problem, not sure on how to fix. |
Hey all—apologies that you're running into these issues, and thanks for your patience. There are some tips for enabling additional debug information at https://developers.google.com/web/tools/workbox/guides/troubleshoot-and-debug#debugging_workbox It would be very helpful if you could opt-in to that extra logging info and then take a look at the DevTools console during a situation in which you don't believe the correct updates are taking place. Do you see anything out of the ordinary logged in those scenarios? |
@jeffposnick - thanks for the reply, if i want enable the debug flag in workbox-build using gulp, how to do that, the one specified is not working for me. |
I am having this exact same issue, is there anything I can provide to help get it resolved? |
@jeffposnick I made several tests, the hash changes but the cache is still the same. How can I force this update and cleanup of all old caches without requiring the user to press (ctrl + f5)? |
Apologies that this remains an issue for you. Here are a few more things to try:
|
2°: I'll try the third if you tell me the other two steps are correct. |
Re: #1, when you click on the We're very close to a 4.0.0 final release, and it does have a rewritten |
I'm having a similar issue and I don't see anything in the |
@GarrettGeorge if you're using Workbox v4, then there should be only one cache for precached entries now. (We no longer use a What gets logged when you update and redeploy on your server, and then reload a client page that has an older version of the service worker active? You should see new entries for the updated precached URLs, and there should be a service worker in the That updated service worker won't go into effect until it leaves |
Hi @jeffposnick , The v4 version was very good. I have only two questions; 1 - I'm using CLI Workbox, ie I do not use import, so how can I know if it's active and can I reload it, just like it does here: https://developers.google.com/web/tools/workbox/guides/advanced-recipes#offer_a_page_reload_for_users 2 - in Workboxx ClI, can I pass some parameter, to tell which version of the workbox to use, example V3 or V4? |
Hello @GlauberF:
|
I do not know what I'm doing wrong.
but when I generate a new build a new service worker does not clear the cache in the browser, it does not update to the latest one.
Example, if I close the browser and open again, it still continues the outdated data, I need to be running multiple times (ctrl + f5) to update the cache.
But I need to see where I'm going wrong, because the end user will not be running multiple times (ctrl + f5)
all this is generating a lot of headache, because we have gone new functionality, but the customer complains that he is not yet showing up the functionality.
my sw configuration file
registering the service worker in my index.html
The text was updated successfully, but these errors were encountered: