Intent to Prototype: Service Worker Registration Id

103 views
Skip to first unread message

Ben Kelly

unread,
Jan 11, 2022, 4:56:31 PM1/11/22
to blink-dev

Contact emails

wande...@chromium.org

Explainer

https://github.com/w3c/ServiceWorker/issues/1512#issue-596157033

Specification

https://github.com/w3c/ServiceWorker/pull/1526

Summary

This feature adds an `id` attribute to ServiceWorkerRegistration which acts as a unique key identifying the registration. Previously the registration's scope was used as the unique key. By moving to a separate `id` value the scope can now be changed atomically without unregistering and re-registering the existing registration.



Blink component

Blink>ServiceWorker

Motivation

This change adds a `ServiceWorkerRegistration.id` attribute which can be used to uniquely identify registrations. This allows us to make the registration's scope mutable. Previously if you wanted to change the scope you would have to unregister and re-register the service worker which could lose state like push subscriptions, etc.



Initial public proposal



TAG review



TAG review status

Pending

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:


Debuggability



Is this feature fully tested by web-platform-tests?

No

Flag name



Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1286462

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5654840750374912

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages