Questions tagged [clear-site-data]

This tag is for questions about the Clear-Site-Data HTTP header.

The Clear-Site-Data HTTP header allows a website to selectively clear client-side data such as cookies and cached resources associated with that site.

See MDN and the draft spec.

8 questions
13
votes
2 answers

What is causing Chrome to show error "The request's credentials mode prohibits modifying cookies and other local data."?

We have a react front-end that is communicating with an ASP Core API. Sometimes we detect there is something wrong with the front-end, including service workers, local cache, and that kind of stuff, so we want to tell the client to clean it…
Ron Sijm
  • 8,490
  • 2
  • 31
  • 48
7
votes
1 answer

Expected behavior when Clear-Site-Data header is set?

According to the docs: Clear-Site-Data header clears browsing data (cookies, storage, cache) associated with the requesting website Now trying it, you can see in the screenshot (Firefox v76) that in the Response section, Clear-Site-Data was set in…
IMB
  • 15,163
  • 19
  • 82
  • 140
5
votes
1 answer

Specify Domain Level for Clear-Site-Data / Subdomains

We use the Clear-Site-Data header for cleaning cookies and other data on logout. 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…
Alex
  • 32,506
  • 16
  • 106
  • 171
1
vote
0 answers

Adding "cache" in Clear-Site-Data slows down page loading

I have added "Clear-Site-Data" header with the following directives: "cache", "storage". This causes the page loading time to increase significantly. After removing the "cache" directive, the loading time returns back to normal. I have read in the…
1
vote
0 answers

Clear-Site-Data header on logout clears from cache only the page logged out from

In my webform application on logout I call public void Logout() { FormsAuthentication.SignOut(); HttpContext.Current.Response.SetCookie(new HttpCookie("AUTH") { Expires = DateTime.Now.AddMinutes(-30) }); …
1
vote
0 answers

clearing cookies and site-data in webview for both android and ios in react-native

I want to clear off some site data which is getting stored on the webview I am using. I read about RCTNetworking, which looks likea solution for iOS. I was not able to successfully implement it. The imports were giving an issue. What could be…
Anika
  • 160
  • 2
  • 10
0
votes
0 answers

Clear-Site-Data: "cache" header is not clearing the disk cache (Tested in Chrome 114.x)

When user hits on login button the login request (ajax request to https://example.com/login) returning site following headers (Clear-Site-Data: "cache") but still getting cached response from the subsequent request. HTTP/1.1 200 OK Date: Sat, 17 Jun…
0
votes
0 answers

How to clear site data of devtool programmatically javascript/jquery

I am trying to have a jquery/javascript code to clear site data of chrome devtool. I found so many similar questions asked by other developers but didn't found any working solution so far. Here is the similar question asked, but the solution is…
DevD
  • 304
  • 1
  • 4
  • 11