Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefetch requests keeping the service worker alive and preventing it from revving its version #347

Open
domenic opened this issue Dec 2, 2024 · 0 comments

Comments

@domenic
Copy link
Collaborator

domenic commented Dec 2, 2024

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

The rest of the section is non-normative.

The behavior in this section is not fully specified yet and will be specified in HTML Standard. The work is tracked by the issue and the pull request.

which links to a PR from 2017 that we never managed to land :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant