Skip to content

Service worker registration when context doing the registration goes away #1781

@youennf

Description

@youennf

Let's say a document is starting to register a service worker and is quickly going away before the service worker script is loaded.
Given the document is the fetch request client, it is expected that the service worker script fetch is terminated as the document is aborted. It then follows that the service worker never gets registered.

This can be tested in https://github.com/WebKit/WebKit/blob/main/LayoutTests/http/wpt/service-workers/register-then-reload.html.
Safari follows the spec (or my interpretation of the spec at least), while Chrome and Firefox seem to continue the fetching of the script and the registration of the service worker.

We should try to converge implementations and clarify the specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions