Clear-Site-Data header

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2023.

* 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.

The HTTP Clear-Site-Data response header sends a signal to the client that it should remove all browsing data of certain types (cookies, storage, cache) associated with the requesting website. It allows web developers to have more control over the data stored by browsers for their origins.

Header type Response header

Syntax

http
// Single directive
Clear-Site-Data: "cache"

// Multiple directives (comma separated)
Clear-Site-Data: "cache", "cookies"

// Wild card
Clear-Site-Data: "*"

Directives

Note: All directives must comply with the quoted-string grammar. A directive that does not include the double quotes is invalid.

"cache"

The server signals that the client should remove locally cached data (the browser cache, see HTTP caching) for the origin of the response URL. Depending on the browser, this might also clear out things like pre-rendered pages, backwards-forwards cache, script caches, WebGL shader caches, or address bar suggestions.

"clientHints"

Indicates that the server will remove all client hints (requested via Accept-CH) stored for the origin of the response URL.

Note: In browsers that support the "clientHints" data type, client hints are also cleared when the "cache", "cookies", or "*" types are specified. "clientHints" is therefore only needed when none of those other types are specified.

"cookies"

The server signals that the client should remove all cookies for the origin of the response URL. HTTP authentication credentials are also cleared out. This affects the entire registered domain, including subdomains. So https://example.com as well as https://stage.example.com, will have cookies cleared.

"executionContexts"

The server signals that the client should reload all browsing contexts for the origin of the response (Location.reload).

"prefetchCache"

Used to clear speculation rules prefetches that are scoped to the referrer origin.

"prerenderCache"

Used to clear speculation rules prerenders that are scoped to the referrer origin.

"storage"

The server signals that the client should remove all DOM storage for the origin of the response URL. This includes storage mechanisms such as:

"*" (wildcard)

The server signals that the client should clear all types of data for the origin of the response. If more data types are added in future versions of this header, they will also be covered by it.

Examples

Sign out of a website

If a user signs out of your website or service, you might want to remove locally stored data, including any prefetched or prerendered content for speculated navigations. To do this, add the Clear-Site-Data header to the page that confirms the logging out from the site has been accomplished successfully (https://example.com/logout, for example):

http
Clear-Site-Data: "cache", "cookies", "storage", "executionContexts", "prefetchCache", "prerenderCache"

Clearing cookies

If this header is delivered with the response at https://example.com/clear-cookies, all cookies on the same domain https://example.com and any subdomains (like https://stage.example.com, etc.), will be cleared out.

http
Clear-Site-Data: "cookies"

Clearing speculations

If this header is delivered with the response at https://example.com/change-state.json, all speculated navigations prerenders on the same domain https://example.com and any subdomains (such as https://stage.example.com), will be cleared.

http
Clear-Site-Data: "prerenderCache"

To clear both prefetch and prerender speculations, both prefetchCache and prerenderCache must be sent:

http
Clear-Site-Data: "prefetchCache", "prerenderCache"

There are cases where clearing one or the other, or both, is appropriate.

For example, a client-side rendered application that pulls in data from JavaScript might use prerenderCache on state change to discard the prerendered pages, but keep the prefetched HTML to use when the page is rendered (or prerendered again).

On the other hand, if the prefetched HTML document contains stale data but the corresponding prerendered page is set up to refresh the data when it is displayed, you may not need to use prerenderCache but you probably will want to use the prefetchCache directive: so that the stale HTML isn't used in a future prerender.

Finally, if the prefetched HTML document contains stale data, and also does not refresh stale content on prerendered pages, then specifying both prefetchCache and prerenderCache is most appropriate.

Specifications

Specification
Clear Site Data
# header

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Clear-Site-Data
Chrome – Full support
Chrome 61 (Release date: 2017-09-05)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 63 (Release date: 2018-10-23)
footnote Full support
Opera – Full support
Opera 48 (Release date: 2017-09-27)
footnote Full support
Safari – Full support
Safari 17 (Release date: 2023-09-18)
footnote Full support
Chrome Android – Full support
Chrome Android 61 (Release date: 2017-09-05)
footnote Full support
Firefox for Android – Full support
Firefox for Android 63 (Release date: 2018-10-23)
footnote Full support
Opera Android – Full support
Opera Android 45 (Release date: 2018-02-15)
footnote Full support
Safari on iOS – Full support
Safari on iOS 17 (Release date: 2023-09-18)
footnote Full support
Samsung Internet – Full support
Samsung Internet 8 (Release date: 2018-07-18)
footnote Full support
WebView Android – Full support
WebView Android 61 (Release date: 2017-09-05)
footnote Full support
WebView on iOS – Full support
WebView on iOS 17 (Release date: 2023-09-18)
footnote Full support
"cache"
Chrome – Partial support
Chrome 61 – 62 (Release date: 2017-09-05)
footnote Removed in 63 and later
footnote Partial support
footnote Setting this value may prevent a page from fully loading. See bug 41343050.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Chrome – Partial support
Chrome 65 – 126 (Release date: 2018-03-06)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Chrome – Partial support
Chrome 127 (Release date: 2024-07-23)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Edge – Partial support
Edge 79 – 126 (Release date: 2020-01-15)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Edge – Partial support
Edge 127 (Release date: 2024-07-25)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Firefox – No support
Firefox 63 – 93 (Release date: 2018-10-23)
footnote Removed in 94 and later
footnote See bug 1838506
Firefox – Full support
Firefox 138 (Release date: 2025-04-29)
footnote Full support
Opera – Partial support
Opera 48 – 49 (Release date: 2017-09-27)
footnote Removed in 50 and later
footnote Partial support
footnote Setting this value may prevent a page from fully loading. See bug 41343050.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Opera – Partial support
Opera 52 – 112 (Release date: 2018-03-22)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Opera – Partial support
Opera 113 (Release date: 2024-08-22)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Safari – Full support
Safari 17 (Release date: 2023-09-18)
footnote Full support
Chrome Android – Partial support
Chrome Android 61 – 62 (Release date: 2017-09-05)
footnote Removed in 63 and later
footnote Partial support
footnote Setting this value may prevent a page from fully loading. See bug 41343050.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Chrome Android – Partial support
Chrome Android 65 – 126 (Release date: 2018-03-06)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Chrome Android – Partial support
Chrome Android 127 (Release date: 2024-07-23)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Firefox for Android – No support
Firefox for Android 63 – 93 (Release date: 2018-10-23)
footnote Removed in 94 and later
footnote See bug 1838506
Firefox for Android – Full support
Firefox for Android 138 (Release date: 2025-04-29)
footnote Full support
Opera Android – Partial support
Opera Android 45 – 45 (Release date: 2018-02-15)
footnote Removed in 46 and later
footnote Partial support
footnote Setting this value may prevent a page from fully loading. See bug 41343050.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Opera Android – Partial support
Opera Android 47 – 83 (Release date: 2018-07-23)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Opera Android – Partial support
Opera Android 84 (Release date: 2024-08-26)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Safari on iOS – Full support
Safari on iOS 17 (Release date: 2023-09-18)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 9 – 27 (Release date: 2018-09-15)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Samsung Internet – Partial support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
WebView Android – Partial support
WebView Android 61 – 62 (Release date: 2017-09-05)
footnote Removed in 63 and later
footnote Partial support
footnote Setting this value may prevent a page from fully loading. See bug 41343050.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
WebView Android – Partial support
WebView Android 65 – 126 (Release date: 2018-03-06)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
WebView Android – Partial support
WebView Android 127 (Release date: 2024-07-23)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
WebView on iOS – Full support
WebView on iOS 17 (Release date: 2023-09-18)
footnote Full support
"clientHints"
Experimental
Chrome – Full support
Chrome 117 (Release date: 2023-09-12)
footnote Full support
Edge – Full support
Edge 117 (Release date: 2023-09-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 103 (Release date: 2023-10-03)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 117 (Release date: 2023-09-12)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 78 (Release date: 2023-10-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 24 (Release date: 2024-01-25)
footnote Full support
WebView Android – Full support
WebView Android 117 (Release date: 2023-09-12)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
"cookies"
Chrome – Full support
Chrome 61 (Release date: 2017-09-05)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 63 (Release date: 2018-10-23)
footnote Full support
Opera – Full support
Opera 48 (Release date: 2017-09-27)
footnote Full support
Safari – Full support
Safari 17 (Release date: 2023-09-18)
footnote Full support
Chrome Android – Full support
Chrome Android 61 (Release date: 2017-09-05)
footnote Full support
Firefox for Android – Full support
Firefox for Android 63 (Release date: 2018-10-23)
footnote Full support
Opera Android – Full support
Opera Android 45 (Release date: 2018-02-15)
footnote Full support
Safari on iOS – Full support
Safari on iOS 17 (Release date: 2023-09-18)
footnote Full support
Samsung Internet – Full support
Samsung Internet 8 (Release date: 2018-07-18)
footnote Full support
WebView Android – Full support
WebView Android 61 (Release date: 2017-09-05)
footnote Full support
WebView on iOS – Full support
WebView on iOS 17 (Release date: 2023-09-18)
footnote Full support
"executionContexts"
Experimental
Chrome – No support
Chrome
footnote
footnote See bug 40599527
Edge – No support
Edge
footnote
footnote See bug 40599527
Firefox – No support
Firefox 63 – 67 (Release date: 2018-10-23)
footnote Removed in 68 and later
footnote See bug 1635189
Opera – No support
Opera
footnote
footnote See bug 40599527
Safari – No support
Safari 17 – 18.2 (Release date: 2023-09-18)
footnote Removed in 18.3 and later
Chrome Android – No support
Chrome Android
footnote
footnote See bug 40599527
Firefox for Android – No support
Firefox for Android 63 – 67 (Release date: 2018-10-23)
footnote Removed in 68 and later
footnote See bug 1635189
Opera Android – No support
Opera Android
footnote
footnote See bug 40599527
Safari on iOS – No support
Safari on iOS 17 – 18.2 (Release date: 2023-09-18)
footnote Removed in 18.3 and later
Samsung Internet – No support
Samsung Internet
footnote
footnote See bug 40599527
WebView Android – No support
WebView Android
footnote
footnote See bug 40599527
WebView on iOS – No support
WebView on iOS 17 – 18.2 (Release date: 2023-09-18)
footnote Removed in 18.3 and later
"prefetchCache"
Experimental Non-standard
Chrome – Full support
Chrome 138 (Release date: 2025-06-24)
footnote Full support
Edge – Full support
Edge 138 (Release date: 2025-06-26)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 122 (Release date: 2025-09-11)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 138 (Release date: 2025-06-24)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 91 (Release date: 2025-08-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 138 (Release date: 2025-06-24)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
"prerenderCache"
Experimental Non-standard
Chrome – Full support
Chrome 138 (Release date: 2025-06-24)
footnote Full support
Edge – Full support
Edge 138 (Release date: 2025-06-26)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 122 (Release date: 2025-09-11)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 138 (Release date: 2025-06-24)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 91 (Release date: 2025-08-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 138 (Release date: 2025-06-24)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Secure context required
Chrome – Full support
Chrome 61 (Release date: 2017-09-05)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 63 (Release date: 2018-10-23)
footnote Full support
Opera – Full support
Opera 48 (Release date: 2017-09-27)
footnote Full support
Safari – Full support
Safari 17 (Release date: 2023-09-18)
footnote Full support
Chrome Android – Full support
Chrome Android 61 (Release date: 2017-09-05)
footnote Full support
Firefox for Android – Full support
Firefox for Android 63 (Release date: 2018-10-23)
footnote Full support
Opera Android – Full support
Opera Android 45 (Release date: 2018-02-15)
footnote Full support
Safari on iOS – Full support
Safari on iOS 17 (Release date: 2023-09-18)
footnote Full support
Samsung Internet – Full support
Samsung Internet 8 (Release date: 2018-07-18)
footnote Full support
WebView Android – Full support
WebView Android 61 (Release date: 2017-09-05)
footnote Full support
WebView on iOS – Full support
WebView on iOS 17 (Release date: 2023-09-18)
footnote Full support
"storage"
Chrome – Full support
Chrome 61 (Release date: 2017-09-05)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 63 (Release date: 2018-10-23)
footnote Full support
Opera – Full support
Opera 48 (Release date: 2017-09-27)
footnote Full support
Safari – Full support
Safari 17 (Release date: 2023-09-18)
footnote Full support
Chrome Android – Full support
Chrome Android 61 (Release date: 2017-09-05)
footnote Full support
Firefox for Android – Full support
Firefox for Android 63 (Release date: 2018-10-23)
footnote Full support
Opera Android – Full support
Opera Android 45 (Release date: 2018-02-15)
footnote Full support
Safari on iOS – Full support
Safari on iOS 17 (Release date: 2023-09-18)
footnote Full support
Samsung Internet – Full support
Samsung Internet 8 (Release date: 2018-07-18)
footnote Full support
WebView Android – Full support
WebView Android 61 (Release date: 2017-09-05)
footnote Full support
WebView on iOS – Full support
WebView on iOS 17 (Release date: 2023-09-18)
footnote Full support
"*" (wildcard)
Chrome – Partial support
Chrome 117 – 126 (Release date: 2023-09-12)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Chrome – Partial support
Chrome 127 (Release date: 2024-07-23)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Edge – Partial support
Edge 117 – 126 (Release date: 2023-09-15)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Edge – Partial support
Edge 127 (Release date: 2024-07-25)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Firefox – Full support
Firefox 63 (Release date: 2018-10-23)
footnote Full support
Opera – Partial support
Opera 103 – 112 (Release date: 2023-10-03)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Opera – Partial support
Opera 113 (Release date: 2024-08-22)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Safari – Full support
Safari 17 (Release date: 2023-09-18)
footnote Full support
Chrome Android – Partial support
Chrome Android 117 – 126 (Release date: 2023-09-12)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Chrome Android – Partial support
Chrome Android 127 (Release date: 2024-07-23)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Firefox for Android – Full support
Firefox for Android 63 (Release date: 2018-10-23)
footnote Full support
Opera Android – Partial support
Opera Android 78 – 83 (Release date: 2023-10-23)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Opera Android – Partial support
Opera Android 84 (Release date: 2024-08-26)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Safari on iOS – Full support
Safari on iOS 17 (Release date: 2023-09-18)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 24 – 27 (Release date: 2024-01-25)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
Samsung Internet – Partial support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
WebView Android – Partial support
WebView Android 117 – 126 (Release date: 2023-09-12)
footnote Partial support
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
WebView Android – Partial support
WebView Android 127 (Release date: 2024-07-23)
footnote Partial support
footnote Some requests may still be taken from the cache unless the tab is reloaded or the page is requested in a new tab. See bug 364634040.
footnote Setting this value may cause seconds-long hangs. See bug 40233601.
WebView on iOS – Full support
WebView on iOS 17 (Release date: 2023-09-18)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.
Non-standard. Check cross-browser support before using.
See implementation notes.
Has more compatibility info.

See also