Partitioned cookies

Anil Verma
1 min readMay 31, 2023

--

Cookies Having Independent Partitioned State (CHIPS)

pic credit -chrome developer

CHIPS

Cookies Having Independent Partitioned State (CHIPS) is a Privacy Sandbox proposal that will allow developers to opt a cookie into “partitioned” storage, with separate cookie jars per top-level site.

A partitioned third-party cookie is tied to the top-level site where it’s initially set and cannot be accessed from elsewhere. The aim is to allow cookies to be set by a third-party service, but only read within the context of the top-level site where they were initially set.

Ex-
A user visits https://site-1.example, which embeds content from https://3rd-party.example. https://3rd-party.example sets a cookie on the user's device.

The user visits https://site-2.example, which also embeds https://3rd-party.example. This new instance of https://3rd-party.example is still able to access the cookie set when the user was on the previous page.

How It Works
Browsers with CHIPs support provide a new attribute for the Set-Cookie HTTP header — Partitioned

Set-Cookie: __Host-example=34d8g; SameSite=None; Secure; Path=/; Partitioned;

--

--

Anil Verma

Hi there 👋, I am Anil Verma, a full stack web developer, and JavaScript enthusiast. 👥 Ask me anything about web development. web- https://anilvermaspeaks.in/