Prefetch requests keeping the service worker alive and preventing it from revving its version #347
Labels
bug
The spec is broken or misaligned with the implementation in some way
in progress
The ideas discussed in this issue are actively being worked on in either implementation or spec
prefetch
Related to prefetching
Another issue @hiroshige-g explained to me is that service worker lifetime and version cycle is tied to the existence of clients. In particular, a service worker cannot upgrade to a new version while clients are alive.
Because we store the reserved client in the prefetch record, this means as long as there are any non-discarded prefetches, a site's service worker will not upgrade.
It'd be better if we allowed service worker upgrades, and evicted the associated prefetch records.
How exactly to specify this is not yet clear to me, as I haven't read up on how service worker lifetime and upgrades work. I worry that it might come down to https://w3c.github.io/ServiceWorker/#control-and-use which states
which links to a PR from 2017 that we never managed to land :(
The text was updated successfully, but these errors were encountered: