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

I have an issue for new release of registerType: 'prompt', #770

Closed
samgholipoor opened this issue Oct 15, 2024 · 5 comments
Closed

I have an issue for new release of registerType: 'prompt', #770

samgholipoor opened this issue Oct 15, 2024 · 5 comments

Comments

@samgholipoor
Copy link

Hi there.

I have an issue with :
VitePWA({
registerType: 'prompt',
})

when I wanna release new version to production, a user comes to my web-app after a long time, he can't load the app and the app is empty, because browser can't serve js files of previous releases and gets 404 (new assets overwrite the previous ones), and on the other hand the new service worker is downloaded and gets stuck and waiting for user accept.

I wanna know how to handle new release with prompt registerType?

@userquin
Copy link
Member

Did you change from auto update to prompt?

Maybe you've your server serving assets with wrong cache headers, check deployment page in the docs.

@elvince
Copy link

elvince commented Dec 17, 2024

@samgholipoor
I have the same issue. Did you solve it?
thanks,

@samgholipoor
Copy link
Author

samgholipoor commented Dec 17, 2024

@elvince
you should set correct cache header for assets, checkout this link:
https://github.com/vite-pwa/vite-plugin-pwa/blob/main/docs/deployment/nginx.md

@userquin
Copy link
Member

@samgholipoor is this issue solved? If so, can we close it?

@samgholipoor
Copy link
Author

@userquin yes

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

3 participants