Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So if the user refreshes after landing on the strict site, cookies will be sent right? Kind of breaks the idempotency of GET.


Correct, strict cookies will be sent with a request that originates from the same origin as the cookie.

It doesn't really break the idempotency of GET, as the idempotency assumes the cookies sent with the request are the same. That is, the expectation remains that if you send the same GET request with the same headers (including the same cookies) you should get the same response back.

Note that this is a client-side feature. The browser is choosing to not send cookies based on this policy. If you're crafting a request yourself it is up to you to include the correct cookies, just as it always has been.

All this is doing is providing a way for websites to ask browsers "never send this cookie unless the user is already on my site" (strict) and "never send this cookie unless the user is already on my site, or is performing a top-level request with a safe method" (lax).

The protocol still expects idempotent behaviour, but the user may be surprised that the browser didn't include their auth token with a top-level request, if the site had requested it be a strict cookie. If that happens it's a shortfall of the site, not of this addition to the protocol.


Thank you for the detailed information, Cogito.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: