Skip to content

What is a push subscription associated with? #384

Closed
@annevk

Description

@annevk

I was trying to make sense of subscribe() but it did something unexpected. It looks at a service worker registration's active worker and uses that to obtain a push subscription. However, very early on in this document we have this description:

Each push subscription is associated with a service worker registration and a service worker registration has at most one push subscription.

What gives?

It does seem like rejection when there's no active worker is intentional: #230.

It also seems to me that a push subscription is not stored with a service worker as you should be able to replace the service worker and retain the subscription.

There's also some weirdness around "having" a push subscription apparently being known information but "getting" the push subscription requiring a "request" (whatever that is).

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