Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The CookieStoreManager
interface of the Cookie Store
API allows service workers to subscribe to events for cookie changes. By using the subscribe()
method a particular service worker registration can indicate that it is interested in change events.
A CookieStoreManager
has an associated ServiceWorkerRegistration
. Each service worker registration has a cookie change subscription list, which is a list of cookie change subscriptions each containing a name and URL. The methods in this interface allow the service worker to add and remove subscriptions from this list, and to get a list of all subscriptions.
To get a CookieStoreManager
, call ServiceWorkerRegistration.cookies
.