SameSite Attribute
The SameSite attribute is a setting that a website can apply to a cookie to control whether the browser sends that cookie when a user arrives from or interacts with a different website. It is commonly used to help reduce certain cross-site attacks, such as cross-site request forgery (CSRF). It is a technical control over how cookies behave across sites, not a mechanism for obtaining user consent.
SameSite is an optional attribute of the HTTP Set-Cookie response header, defined in RFC 6265bis, that lets a developer declare whether a cookie should be restricted to a first-party or same-site context. It accepts values such as Strict, Lax, and None, which govern whether the browser attaches the cookie to cross-site requests; Strict withholds the cookie from cross-site requests, while Lax and None permit it under differing conditions. The attribute is implemented across major browsers, and its primary security use case is mitigating cross-site request forgery. Note that SameSite is a browser-level technical control affecting cookie transmission behavior and does not, by itself, address consent obligations under the ePrivacy Directive or personal-data processing obligations under the GDPR; those requirements must be assessed separately. This definition does not cover the detailed per-browser default behaviors or their evolution over time, which may vary and change.
Why it matters
The SameSite attribute matters primarily as a security control rather than a consent mechanism. By declaring whether a cookie should accompany cross-site requests, developers can reduce the risk of certain cross-site attacks, most notably cross-site request forgery (CSRF). For organizations building web applications that rely on cookies for session management, configuring SameSite appropriately is a recognized part of defensive coding practice, and it is supported across major browsers.
For compliance teams, the more important point is what SameSite does not do. Setting a cookie to Strict, Lax, or None affects only how the browser transmits that cookie across sites; it says nothing about whether the placing of the cookie or any subsequent processing of personal data is lawful. Consent obligations under the ePrivacy Directive and its national implementations, and personal-data processing obligations under the GDPR, must be assessed separately. A well-configured SameSite value does not substitute for a valid legal basis or for obtaining consent where consent is required.
Because SameSite is a technical attribute that governs cross-site behavior, it can be relevant when reasoning about third-party cookies and cross-site tracking, but it should not be treated as a privacy control in its own right. Teams that conflate a security-oriented attribute with a consent obligation risk overlooking distinct requirements that apply regardless of how cookies are technically transmitted.
Who it's relevant to
Inside SameSite Attribute
Common questions
Answers to the questions practitioners most commonly ask about SameSite Attribute.