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.
Syntax:
Clear-Site-Data: "cache"|"cookies"|"storage"|"executionContexts"|"*"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: " * "
- Google Chrome
- Firefox
- Opera