Third-party cookie demo
The image and iframe on this page are from a different site:
3p-site.glitch.me
A Set-Cookie
header is included with the response to the request for both the image and the iframe:
- Image: 3p-site.glitch.me/images/kittens.jpg
Response header:Set-Cookie: cat=tabby; Path=/; Max-Age=86400; Secure; HTTPOnly
This header has noSameSite
attribute, so the defaultSameSite=Lax
is applied. TheLax
default blocks cross-site cookies except in response to following a link to a web page, so cross-site requests for this image will not include the cookie. - Iframe: 3p-site.glitch.me/iframe/index.html
Response header:Set-Cookie: cat=tabby; Path=/; Max-Age=86400; Secure; HTTPOnly SameSite=None
This header has aSameSite=None
attribute, so the cookie will be included in response to cross-site requests to this iframe.
Find out more: Cookie SameSite attribute

See how it works
- Open the Chrome DevTools Network panel
- Click on
index.html
(from the iframe) orkittens.jpg
- In the Headers tab, view
Set-Cookie
in the Response Headers. - The first time you open the page, no cookies have been set yet, so there won't be a
Cookie
entry in the Request Headers. - Subsequent requests will include
Cookie
headers. A request for the image will include both thecat=tabby
andiframe-seen=true
cookies. Other requests will only includeiframe-seen=true
. - You can also view cookies from the Application panel. Try Ctrl-Alt-click to clear cookies, and then reopen the page.
You can view the backend Node code that sets the cookies in server.js.