Skip to content

Commit

Permalink
Add Clear-Site-Data clientHints documentation (#28476)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdavidmills authored Aug 10, 2023
1 parent 993b324 commit a9deb11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions files/en-us/web/http/client_hints/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ In other words, the request for a specific set of hints does not expire until th
A server can replace the set of client hints it is interested in receiving by resending the `Accept-CH` response header with a new list.
For example, to stop requesting any hints it would send `Accept-CH` with an empty list.

> **Note:** The client hints set for a particular origin can also be cleared by sending a {{httpheader("Clear-Site-Data", "Clear-Site-Data: \"clientHints\"")}} response header for a URL inside that origin.
## Low entropy hints

Client hints are broadly divided into high and low entropy hints.
Expand Down
8 changes: 8 additions & 0 deletions files/en-us/web/http/headers/clear-site-data/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ Clear-Site-Data: "*"
> **Note:** All directives must comply with the [quoted-string grammar](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6). A directive that does not include the double quotes is invalid.
- `"cache"` {{Experimental_Inline}}

- : Indicates that the server wishes to remove locally cached data (the browser cache, see [HTTP caching](/en-US/docs/Web/HTTP/Caching)) for the origin of the response URL. Depending on the browser, this might also clear out things like pre-rendered pages, script caches, WebGL shader caches, or address bar suggestions.

- `"clientHints"` {{Experimental_Inline}}

- : Indicates that the server wishes to remove all [client hints](/en-US/docs/Web/HTTP/Client_hints) (requested via {{httpheader("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"`
- : Indicates that the server wishes to 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.
- `"storage"`
Expand Down

0 comments on commit a9deb11

Please sign in to comment.