The HTTP header Clear-Site-Header is a response-type header. This header is used in deleting the browsing data which is in the requesting website. These browsing data includes cache, cookies, storage and executionContents. It helps the web developers to have an improved level of control over data stored by the browser locally.
Note: The data to be deleted, directibves should be given within double quotes (” “). Multiple directives can be given at a time.
Directives: This header accepts four directives mentioned above and described below:
- “cache”: It represents that the server wishes to remove locally cached data.
- “cookies”: It represents the server wishes to delete all the cookies for the origin of response URL.
- “storage:” It represents the server wishes to remove locally stored data.
- “executionContents”: It represents the server wishes to remove all the browsing contents for the origin of response URL.
- ” * “: It represents the server wishes to delete all types of data for the origin of response URL.
- In this example header wants to delete the cache, cookies, storage and executionContents data.
Clear-Site-Data: "cache", "cookies", "storage", "executionContents"
- In this example header wants to delete all the data.
Clear-Site-Data: " * "
Based on the directives mentioned, the corresponding type of data will be removed. To check the Clear-Site-Data go to the Inspect Element->Network click any visible name after that click the header tab if this header is used then it will be visible to you.
Supported Browsers: The browsers compatible with HTTP Clear-Site-Data headers are given below.
- Google Chrome
- HTTP headers | Access-Control-Expose-Headers
- HTTP headers | Access-Control-Request-Headers
- HTTP headers | Access-Control-Allow-Headers.
- HTTP Headers | TE
- HTTP headers
- HTTP headers | Age
- HTTP headers | Via
- HTTP headers | Allow
- HTTP headers | SourceMap
- HTTP headers | If-Unmodified-Since
- HTTP headers | Retry-After
- HTTP headers | Digest
- HTTP headers | Expect
- HTTP headers | expires
- HTTP headers | Set-Cookie
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.