WIP: delegate SW registration to the user#1081
WIP: delegate SW registration to the user#1081kosciolek wants to merge 1 commit intoAxaFrance:mainfrom
Conversation
| return await registration.unregister(); | ||
| }; | ||
|
|
||
| registration.addEventListener('updatefound', () => { |
There was a problem hiding this comment.
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.
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