Use the Clear-Site-Data HTTP header to clear browsing data
The Clear-Site-Data
header tells the client browser to delete browsing data for the origin/domain. The accepted directives are cache
, cookies
, storage
, executionContexts
or *
(wildcard), e.g.:
Clear-Site-Data: "cookies"
Clear-Site-Data: "cache", "storage"
Clear-Site-Data: "*"
The downside is that this is still an experimental and unstandardized feature which works only on recent versions of Chrome/Firefox. More information can be found on MDN.