Back to Guides
Guide16 September 2026

What is the difference between SameSite Lax and SameSite None cookies?

Decloak is an AI-powered web security intelligence platform that scans a site's HTTP/TLS posture, JavaScript, and third-party scripts to produce a report anyone can read. This guide is part of Decloak's library of practical, source-backed security guidance.

In this guide
  1. Key takeaways
  2. What does SameSite=Lax actually do?
  3. What does SameSite=None actually do?
  4. Why does the Secure flag matter for SameSite=None?
  5. Default behavior when the attribute is omitted
  6. Typical use - cases for SameSite=Lax
  7. Typical use - cases for SameSite=None
  8. Example Set - Cookie headers
  9. How to choose the right setting
  10. Common pitfalls
  11. Summary

Key takeaways

What does SameSite=Lax actually do?

SameSite=Lax allows the cookie to travel on same - site requests and on cross - site top - level navigations that use a safe HTTP method such as GET. It does not send the cookie on cross - site sub - resource requests (images, iframes, fetch/AJAX) or on cross - site POST/PUT/DELETE forms. This behavior stops the most common CSRF vectors while still letting a user click a link from another site and stay logged in.

What does SameSite=None actually do?

SameSite=None disables SameSite protection entirely. The cookie is included on all requests, both same - site and cross - site, including sub - resources, POSTs, iframes, and fetches. Because the cookie is exposed everywhere, browsers require the Secure attribute; a cookie with SameSite=None that is not Secure is silently rejected.

Why does the Secure flag matter for SameSite=None?

The Secure flag forces the cookie to be sent only over HTTPS. Without it, a SameSite=None cookie could be leaked over an insecure connection, undermining confidentiality. Browsers enforce this rule: any SameSite=None cookie lacking Secure is dropped, protecting users from accidental exposure.

Default behavior when the attribute is omitted

Since Chrome 80 and other modern browsers, omitting the SameSite attribute is treated as SameSite=Lax. This means you get baseline CSRF protection without any configuration, but you also lose the ability to send cookies cross - site unless you explicitly set SameSite=None; Secure.

Typical use - cases for SameSite=Lax

Typical use - cases for SameSite=None

Set-Cookie: sessionId=abc123; SameSite=Lax; Secure; HttpOnly
Set-Cookie: widgetToken=xyz789; SameSite=None; Secure; HttpOnly

The first cookie will be omitted on cross - site POSTs or image requests; the second will travel on every request but only over HTTPS.

How to choose the right setting

  1. Ask yourself if the cookie ever needs to be read by another origin. If no, use SameSite=Lax (or omit the attribute).
  2. If cross - origin access is required, set SameSite=None; Secure. Verify that the site is always served over HTTPS.
  3. Add HttpOnly and Secure where possible for defense - in - depth, regardless of SameSite value.
  4. Test in multiple browsers, especially older ones that may interpret None as Strict and break functionality.

Common pitfalls

Summary

SameSite=Lax offers a safe default that blocks most cross - site request forgery attacks while still allowing normal navigation. SameSite=None removes that protection and should only be used when a cookie must be shared across origins, and it must always be paired with Secure. Understanding the trade - off helps you protect users without breaking legitimate cross - origin workflows.

Free security scan

See what's actually exposed on your site.

Decloak's free scan runs in about 15 seconds, no account required, and covers:

  • HTTP/TLS security posture
  • JavaScript CVEs
  • Exposed Supabase/Lovable/Base44 misconfigurations
  • AI-written executive summary