这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@domenic

Description

@domenic

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 :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe spec is broken or misaligned with the implementation in some wayin progressThe ideas discussed in this issue are actively being worked on in either implementation or specprefetchRelated to prefetching

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions