-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
WIP: delegate SW registration to the user #1081
base: main
Are you sure you want to change the base?
Conversation
@@ -188,21 +187,6 @@ export const initWorkerAsync = async(serviceWorkerRelativeUrl, configurationName | |||
return await registration.unregister(); | |||
}; | |||
|
|||
registration.addEventListener('updatefound', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code reloads the page if an update to a service worker is detected, is it really needed? if the user manages the service worker on his own, it probably should be on his side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know,
may be another property to disable this default behavior would be a nice idea.
The difficulty, is link to the time to leave request which maintain the old service worker to life and block updates.
I does not found a cleaner default behavior way. Many people does not understand well service worker so I prefer a default page realoard in production than all production page broken.
May be a clean defaut and safer way can be found.
Please continue You PullRequest. |
e635488
to
e04fb4b
Compare
12d8328
to
1b4bc07
Compare
hi @kosciolek , I'am very sorry @kosciolek for the delay. I was too busy :'( |
0af446c
to
bf19dd0
Compare
4d00d68
to
0cc3821
Compare
620a9d3
to
e386fa1
Compare
34329f1
to
6e63e9e
Compare
Hi @guillaume-chervet! This PR was discontinued as we deprioritized this functionality on our side. Feel free to close this and we will eventually continue if we find this feature needed. |
I would like to have this PR functionality for my PWA using Vite. I am forced to use the library without the service worker functionality since it is breaking my Periodic SW Updates (https://github.com/vite-pwa/vite-plugin-pwa/blob/main/docs/frameworks/react.md#periodic-sw-updates) |
just an exploratory PR, feel free to close it at will