Since June 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
* Some parts of this feature may have varying levels of support.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is only available in Service Workers.
The deleted read-only property of the ExtendableCookieChangeEvent interface returns any cookies that have been deleted by the given ExtendableCookieChangeEvent instance.
An array of objects containing the deleted cookie(s). Each object contains the following properties:
nameA string containing the name of the cookie.
valueA string containing the value of the cookie.
domainA string containing the domain of the cookie.
pathA string containing the path of the cookie.
expiresA timestamp, given as Unix time in milliseconds, containing the expiration date of the cookie.
secureA boolean indicating whether the cookie is used only in a secure context (HTTPS rather than HTTP).
sameSiteOne of the following SameSite values:
"strict"Cookies will only be sent in a first-party context and not be sent with requests initiated by third party websites.
"lax"Cookies are not sent on normal cross-site subrequests (for example to load images or frames into a third party site), but are sent when a user is navigating within the origin site (i.e., when following a link).
"none"Cookies will be sent in all contexts.
partitionedA boolean indicating whether the cookie is a partitioned cookie (true) or not (false). See Cookies Having Independent Partitioned State (CHIPS) for more information.
In this example when the cookie is deleted the event listener logs the first item in the deleted property to the console. It contains an object representing the cookie that has just been deleted.
self.addEventListener("cookiechange", (event) => {
console.log(event.deleted[0]);
});
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
deleted |
87 | 87 | 140 | 73 | 18.4 | 87 | 140 | 62 | 18.4 | 14.0 | 87 | 18.4 |
partitioned_property |
114 | 114 | No | 100 | 18.4 | 114 | No | 76 | 18.4 | 23.0 | 114 | 18.4 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ExtendableCookieChangeEvent/deleted