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

Service worker is not picking new build JS/CSS files #38

Open
rsoni5519 opened this issue Oct 6, 2022 · 0 comments
Open

Service worker is not picking new build JS/CSS files #38

rsoni5519 opened this issue Oct 6, 2022 · 0 comments

Comments

@rsoni5519
Copy link

This issue is not related with ur repo but it will will be helpful if u can help me here.
I created one react app with CRA and integrated service worker to cache mainly JS and CSS files. When I ran the build for 2nd time and reload my page. It's still loading the 1st build JS files (It should load the 2nd JS files from server and then should load from the cache in subsequent loads).

When I manually empty the cache and hard reload option then this time New js files load from the network and subsequent loads the correct JS files.

How can we resolve this as I am going to use this code in app where my code will run in the browser. I don't want to provide some WA like giving a button to the user to hard reload.

Is workbox providing some solution to this? Please check below code. https://github.com/rsoni5519/sw-app
service worker issue

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

1 participant