Re: [w3c/ServiceWorker] Immediate Service Worker (#1389)

I might be miss something, but would it help to use push event when the worker needs to be update?
```javascript
onpush = e => { 
  if (NeedsUpdate(e.data)) {
    self.registration.update();
  }
}
```

It'll just work as the service worker's lifecycle, so I don't think we need a hack around the cache.
When unfortunately any of the tabs are opened when an update happens, we can ask to reload the page.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1389#issuecomment-469987775

Received on Wednesday, 6 March 2019 06:38:43 UTC