Closed jgaehring closed 4 years ago
Interesting comment I found in this demo:
// At this point, registration has taken place.
// The service worker will not handle requests until this page and any
// other instances of this page (in other tabs, etc.) have been
// closed/reloaded.
I wonder if this is why some people had trouble getting the app to update, if they had it open in another tab somewhere. Hmm... :thinking:
Took a first pass at this with b6c8ad9 and it's working pretty well! Next step is to replace the window.confirm()
with a custom banner.
Details here on how this can be done with Workbox:
https://developers.google.com/web/tools/workbox/guides/advanced-recipes#offer_a_page_reload_for_users
We're using the workbox Webpack plugin; not sure the same thing can be achieved with that, but we can explore options.