Live data from Hacker News

Handling Service Worker updates – keep the app updated and stay sane (2020)

whatwebcando.today

1–2 of 2 posts

Re: Handling Service Worker updates – keep the app updated and stay sane (2020)

#2
Another painpoint I've found looking up service worker tutorials is how most focus exclusively on precaching and generating a manifest. They're likely using Workbox and its GenerateSW mode directly or through a framework plugin, which can't be extended beyond its precaching capabilities. If you want to add Web Push notifications, get ready to write your own service worker from scratch with `InjectManifest` mode.

I'd also recommend having a Settings page somewhere to deregister Service Workers, and the same button in the modal for updating.