Third-party cookie
A third-party cookie is a cookie from a site that is not the site in the address bar. A cookie of a cross-site iframe is a third-party cookie.
Concept
Also called Cross-site cookie
Updated
On this page
Example
HTTP response header from https://widget.example
Set-Cookie: widget_session=7yjgj57e4n3d; SameSite=None; Secure; HttpOnly
On https://shop.example, this cookie from the widget frame is a third-party cookie.
How to set it
Send SameSite=None and Secure, or the browser does not send the cookie in a cross-site frame. Add Partitioned for browsers that block third-party cookies.
# Sent in a cross-site frame, if the browser allows third-party cookies Set-Cookie: session=abc123; Path=/; Secure; HttpOnly; SameSite=None # One copy for each top-level site (CHIPS) Set-Cookie: __Host-session=abc123; Path=/; Secure; HttpOnly; SameSite=None; Partitioned
Test in Safari and in a Chrome Incognito window. Both block third-party cookies by default.
Learn more
Sources