HTTPREF
← Back to headers

HTTP Header

Clear-Site-Data

Security

Instructs the browser to clear stored data associated with a website.

HTTP header reference, syntax, examples, and developer usage.

What is the Clear-Site-Data header?

The Clear-Site-Data HTTP header is used to transmit metadata between a client and server as part of HTTP requests or responses.

HTTP headers define how content should be interpreted, cached, authenticated, secured, or processed by browsers and APIs.

Direction

This header may appear in both HTTP requests and responses.

Syntax

Clear-Site-Data: "cache", "cookies", "storage"

Example

Clear-Site-Data: "cache", "cookies", "storage"

Common use cases

  • Logging users out completely
  • Resetting browser-side state after security incidents
  • Clearing cached content and stored data after sensitive changes

Common mistakes

  • Using the header in the wrong request or response context
  • Sending invalid header values
  • Incorrect header syntax
  • Assuming the header automatically changes server behaviour

Practical developer insight

Clear-Site-Data is powerful because it can wipe cookies, storage, and caches in one response. It is often used after logout flows, account resets, or security-sensitive events where client-side state should not persist.

Related headers