Skip to content
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

"Cache and Network Update" and disk cache #169

Open
lechoslaw opened this issue Jun 13, 2022 · 5 comments
Open

"Cache and Network Update" and disk cache #169

lechoslaw opened this issue Jun 13, 2022 · 5 comments
Milestone

Comments

@lechoslaw
Copy link

Hi
I have a problem with the service worker on my smartphone with js files and '"Cache and Network Update"' mode enabled. When the worker server cannot find a file in the cache, it goes to the browser "disk cache" instead of the Internet.
Only after turning on 'disable cache' in Chrome Devtools in the browser, js files are updated.
Can I do something about it?

@tbela99 tbela99 added this to the v3.1.2 milestone Jun 13, 2022
@lechoslaw
Copy link
Author

I guess this problem is because service worker cache resources with response status 404

@lechoslaw
Copy link
Author

If the service worker caches a 404 resource, then refreshing the page does not increase the age value (it remains at 0).
Until the 'Disable cache' option is selected in DevTools, the page will never refresh the resource from the Internet (only from disk cache)

@tbela99
Copy link
Owner

tbela99 commented Jun 14, 2022

Hello, I think 404 resources (or anything with response.ok set to false) are not cached. I will need to confirm that

@lechoslaw
Copy link
Author

lechoslaw commented Jun 14, 2022 via email

@tbela99
Copy link
Owner

tbela99 commented Jun 14, 2022

actually, if the page is cached, all the urls inside will of course remain identical

@tbela99 tbela99 modified the milestones: v3.1.2, v3.1.3 Jul 14, 2022
@tbela99 tbela99 modified the milestones: v3.1.3, v3.1.4 Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants