IT lexicon › Web › SameSite cookie

SameSite cookie

Web På svenska → Updated: 2026-05-27

Cookie attribute that controls when the cookie is sent for cross-site requests. Strict = never cross-site, Lax = on top-level navigation, None = always (requires Secure). The primary defense against CSRF.

Chrome flipped default to Lax in 2020 (Chrome 80) — broke many third-party iframes and tracking cookies that didn't explicitly set SameSite=None. Strict breaks classic use cases: clicking a link from Slack to an internal app → no cookie, new login required. Lax is the pragmatic default. Combine with a CSRF token for double defense (some browsers ignore it). Security win: an attacker site running fetch('https://bank.com', {credentials:'include'}) gets no cookie sent with default Lax.

← Back to the lexicon