# [RFC] [Discussion] CHIPS

- Thread: https://externals.io/message/128047
- Original archive: https://news-web.php.net/php.internals/128047
- Started by Dmitry Derepko on 2025-07-15T10:09:46+00:00
- Messages: 5
- RFC: Cookies Having Independent Partitioned State (CHIPS) (Implemented (PHP 8.5)) — https://externals.io/rfc/chips.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #128047 — Dmitry Derepko — 2025-07-15T10:09:46+00:00

URL: https://externals.io/message/128047#128047

Hi internals,

In collaboration with Niels Dossche I'd like to start the discussion for an
RFC proposing a new Cookie option for use with CHIPS technology.

As Niels noted, today is the day when in 4 weeks there will be code freeze,
so let's try to fit into the lines and deliver the value to PHP 8.5.

RFC: https://wiki.php.net/rfc/chips
Implementation: https://github.com/php/php-src/pull/12652
Previous discussions: https://externals.io/message/127902,
https://externals.io/message/122028

-- 
Best regards,
Dmitrii Derepko.
@xepozz

---

## #128080 — Derick Rethans — 2025-07-16T12:31:28+00:00

URL: https://externals.io/message/128047#128080 · In reply to: #128047

> In collaboration with Niels Dossche I'd like to start the discussion 
> for an RFC proposing a new Cookie option for use with CHIPS 
> technology.
> 
> As Niels noted, today is the day when in 4 weeks there will be code 
> freeze, so let's try to fit into the lines and deliver the value to 
> PHP 8.5.

I'm not so keen on trying to rush things before meeting a deadline, but 
I think that this addition seems entirely reasonable.

cheers,
Derick

---

## #128084 — tim@bastelstu.be — 2025-07-16T13:53:06+00:00

URL: https://externals.io/message/128047#128084 · In reply to: #128080

Hi

> > […]
> 
> I'm not so keen on trying to rush things before meeting a deadline, but
> I think that this addition seems entirely reasonable.

I agree on both of these points. The RFC appears well-researched 
(including the support for sessions, which I would likely not have 
thought of myself) and has a very straight forward implementation, since 
it's just extending an existing API based on an external standard, 
making it reasonably risk-less.

As to the RFC text itself, I like how carefully the “RFC Impact” section 
of the updated RFC template [1] has been filled in. I don't have any 
other remarks, except LGTM :-)

Best regards
Tim Düsterhus

[1] https://externals.io/message/127834

---

## #128110 — Claude Pache — 2025-07-18T14:15:35+00:00

URL: https://externals.io/message/128047#128110 · In reply to: #128047

> Le 15 juil. 2025 à 12:09, Dmitry Derepko <xepozzd@gmail.com> a écrit :
> 
> Hi internals,
> 
> In collaboration with Niels Dossche I'd like to start the discussion for an RFC proposing a new Cookie option for use with CHIPS technology.
> 
> As Niels noted, today is the day when in 4 weeks there will be code freeze, so let's try to fit into the lines and deliver the value to PHP 8.5.
> 
> RFC: https://wiki.php.net/rfc/chips
> Implementation: https://github.com/php/php-src/pull/12652
> Previous discussions: https://externals.io/message/127902, https://externals.io/message/122028
> 

Hi,

1. The RFC says: “CHIPS technology was introduced not so long ago, but still has “little” adoption (currently “only” available in Blink-based browsers).”

It might be useful to add the following precisions, so that we are more confident that it has good chance not to remain a Blink-only feature:
* As of time of writing, there is an experimental implementation in Firefox.
* The feature has also been implemented in Safari, but has been temporarily disabled because of an issue known by Apple only.


2. All examples in the RFC are variations on `setcookie("name", "value", ["secure" => true, "partitioned" => true]);`, without same-site attribute.

As partitioned cookies are only meaningful as third-party cookies, what is the behaviour when:

(a) the same-site attribute is set to anything different from "None"?
(b) the same-site attribute is omitted? (Although historically, omitting the same-site parameter is equivalent to setting it to "None", browser vendors are willing to switch the default to "Lax", and some browsers (including Blink-based ones) have already done the switch.)

In all examples I’ve seen on the web, an explicit `samesite=None` attribute is added to partitioned cookies, probably for some good reason?

—Claude

---

## #128140 — Niels Dossche — 2025-07-20T09:14:05+00:00

URL: https://externals.io/message/128047#128140 · In reply to: #128110

> Hi,
> 

Hi Claude

> 1. The RFC says: “CHIPS technology was introduced not so long ago, but still has “little” adoption (currently “only” available in Blink-based browsers).”
> 
> It might be useful to add the following precisions, so that we are more confident that it has good chance not to remain a Blink-only feature:
> * As of time of writing, there is an experimental implementation in Firefox.
> * The feature has also been implemented in Safari, but has been temporarily disabled because of an issue known by Apple only.
> 

Sure! Those are good points to clarify the introduction. Thanks!

> 
> 2. All examples in the RFC are variations on `setcookie("name", "value", ["secure" => true, "partitioned" => true]);`, without same-site attribute.
> 
> As partitioned cookies are only meaningful as third-party cookies, what is the behaviour when:
> 
> (a) the same-site attribute is set to anything different from "None"?
> (b) the same-site attribute is omitted? (Although historically, omitting the same-site parameter is equivalent to setting it to "None", browser vendors are willing to switch the default to "Lax", and some browsers (including Blink-based ones) have already done the switch.)
> 
> In all examples I’ve seen on the web, an explicit `samesite=None` attribute is added to partitioned cookies, probably for some good reason?

Yep, all examples use "samesite=None" because you need that to create a 3rd party cookie. So including "Partitioned" without "samesite=None" is useless in those cases.
Although if "samesite=Lax" is still the default for a particular browser, then it won't be useless, but I believe the goal is - as you said - to switch all browsers over to "samesite=None".
According to https://github.com/privacycg/CHIPS, the following will happen:

(a) The cookie won't be sent to a 3rd party context and "Partitioned" won't have an effect. The cookie header is still interpreted correctly so it will have an effect on the origin site, just not in a 3rd party context.
(b) Depends on what the default is for a particular browser.

Kind regards
Niels
