SameSite
SameSite is a Set-Cookie attribute that controls if the browser sends a cookie with cross-site requests. It has three values, Strict, Lax, and None.
Cookie attribute
Updated
On this page
Example
HTTP response header
Set-Cookie: session=abc123; Path=/; Secure; HttpOnly; SameSite=None
Without Secure, the browser ignores a cookie with SameSite=None.
How to set it
Use Lax or Strict for a cookie that only your own site needs. Use None with Secure for a cookie that a cross-site iframe needs.
# Only your own site Set-Cookie: session=abc123; Path=/; Secure; HttpOnly; SameSite=Lax # Also in a cross-site iframe Set-Cookie: session=abc123; Path=/; Secure; HttpOnly; SameSite=None
SameSite=None does not get past third-party cookie blocking. Safari can still block the cookie.
Learn more
Sources