News for hackers. Stuff that matters.
Re:Google won't ditch third-party cookies in Chrome after all by legitster on Tuesday April 22, 2025 @07:15PM (#43767170)
> In some ways, this is a loss—tracking cookies are undeniably terrible, and Google's proposed alternative is better for privacy, at least on paper. However, universal adoption of the Privacy Sandbox could also give Google more power than it already has, and the supposed privacy advantages may never have fully materialized as Google continues to seek higher revenue.

Cookies are much maligned these days, but to defend them a little bit - the alternatives are almost universally worse for user privacy. Persistent session storage? Browser fingerprinting? Locking everything behind a user account with mandatory sign-in? Blegh.

On the other hand, cookies are a pretty transparent interaction. It's a tiny file that sites in your browser. You can look at them. They expire on their own. You as a user can delete, modity, edit, hack them to your heart's content. They contain no PII on their own. They are old-fashioned and limited and that's a good thing.

The real problem here is not the cookie - it's the third party data networks. I would much rather focus our ire on the function rather than the form.

Re:Google won't ditch third-party cookies in Chrome after all by Buttons840 on Tuesday April 22, 2025 @08:13PM (#43767514)
> You as a user can delete, modity, edit, hack them to your heart's content.

This is not true in practice though. Cryptography means they cannot be altered if their creator doesn't want them to be altered.

Of all the CRUD operations, users can only realiably delete the cookie.

Re:Google won't ditch third-party cookies in Chrome after all by NBJack on Tuesday April 22, 2025 @09:42PM (#43767943)
I gotta ask: how many cryptographically secure cookies have you encountered? In theory, yes. In practice? That's kind of expensive.
Re:Google won't ditch third-party cookies in Chrome after all by briHass on Tuesday April 22, 2025 @10:43PM (#43768201)
Anything on the ASP.NET stack has it in forms auth tickets and role cookies. You could store additional data in the forms auth one, and it auto-rotates the encryption at half the session length.

One of the best authentication libraries at the time.

Re:Google won't ditch third-party cookies in Chrome after all by mubou on Tuesday April 22, 2025 @11:31PM (#43768396)
ASP.NET is so underrated. It's by far the most comprehensive and adaptable web framework I've ever encountered.
Re:Google won't ditch third-party cookies in Chrome after all by solardev on Wednesday April 23, 2025 @12:40AM (#43768649)
Microsoft's developer experience is often world class. If they hadn't burned so much goodwill in the 90s and 2000s through embrace, extend, extinguish, they might have won (or at least stayed relevant) through the Web wars.

It's still hard to trust them today, for me at least.

Re:Google won't ditch third-party cookies in Chrome after all by mubou on Wednesday April 23, 2025 @04:51AM (#43769953)
The fact that we're both being downvoted without a reply/explanation is a testament to that, it seems :(

I can't imagine anyone who's actually used it responding that way.

Re:Google won't ditch third-party cookies in Chrome after all by 3np on Tuesday April 22, 2025 @11:33PM (#43768406)
Storing JWTs as cookies is not that rare in practice.
Re:Google won't ditch third-party cookies in Chrome after all by rileymat2 on Tuesday April 22, 2025 @10:04PM (#43768040)
As far as preventing editing, but not reading, JWTs are very common.
Re:Google won't ditch third-party cookies in Chrome after all by dudeinjapan on Tuesday April 22, 2025 @10:45PM (#43768219)
Many web frameworks like Rails allow you to easily fully encrypt (make unreadable to browser) or sign (make readable but not editable) with a server-side key. Some pen testers will report unsigned or unencrypted cookies so I imagine its quite common.
Re:Google won't ditch third-party cookies in Chrome after all by zeroCalories on Tuesday April 22, 2025 @09:54PM (#43767991)
If you wanna do any kind of restful service securely you need to sign your data.
Re:Google won't ditch third-party cookies in Chrome after all by jkrejcha on Tuesday April 22, 2025 @10:51PM (#43768241)
There's nothing about that that requires JWTs/signed cookies.

You may need JWTs or their moral equivalents for 3rd party services but, especially for 1st party services, session identifiers are a fine enough scheme that are oftentimes implemented more securely and have the same amount of statelessness (at least from a REST perspective) as a JWT.

Not that cookies are allowable within the constraints of REST anyway due to violation of the uniform interface/stateless constraints, but pragmatically cookies have the most user agent support, and when used as just an session identifier, are relatively close to following the constraints and are much better supported than using the Authorization header or whatever[1].

Statelessness (the lack of "sessions") refers generally to the fact that the client and the server don't need to share state, i.e. the client has all it needs to make a request rather than, like, an "authorization context" or something (which is what a "user session" colloquially is). Unfortunately, the difference in the way the terms were used kinda led to this confusion which made people think that they weren't doing REST unless they were using JWTs or signed cookies.

It's the difference between storing the shopping cart in a cookie or what have you vs. creating a shopping cart resource. In the former scenario, the server has to track where in the (often implicit) state machine the current client is[2], whereas in the latter, the client has all it needs (a URI, authz token, etc) to make the request and all the state is stored server-side.

[1]: If browsers had better support for setting the Authorization header somehow, this would almost certainly just be a "best practice" that we take for granted. Automated clients with API keys tend to be better in this regard.

[2]: And there are significant disadvantages to doing it this way, if you've ever lost your cart or got those weird "session expired" errors after hitting the back button, you've ran into the pitfalls of doing it this way.

Re:Google won't ditch third-party cookies in Chrome after all by Fire-Dragon-DoL on Wednesday April 23, 2025 @01:01AM (#43768742)
Rails encrypts them too, or sign them, one of the two. Either way, you cannot tamper them
Re:Google won't ditch third-party cookies in Chrome after all by franga2000 on Wednesday April 23, 2025 @04:27AM (#43769824)
They used to be the norm in Django, Flask, RoR and ASP.NET, which made up the majority of the non-PHP web. These days database queries are cheap enough that most new sites just use session tokens, but that's also not something you can modify (well, besides transplanting it from a different session).
Re:Google won't ditch third-party cookies in Chrome after all by creatonez on Wednesday April 23, 2025 @12:19AM (#43768577)
> Of all the CRUD operations, users can only realiably delete the cookie.

I mean, one other operation I can think of is swapping a cookie out for a different one, so you can have two separate sessions managed independently... Which is essentially what Firefox's container tabs are.

Re:Google won't ditch third-party cookies in Chrome after all by zmmmmm on Tuesday April 22, 2025 @07:59PM (#43767435)
first party cookies yes

But third party cookies are a lot more insidious, because they get sent without any visibility to the user and have generally peripheral relevance to the application they are using. It's like if you go to the supermarket and they ask you if you want to sign up for a loyalty card and you say yes, vs you go to the supermarket and they secretly plant trackers on you so that when you go to other shops they can tell who you are. One is a lot worse than the other.

Re:Google won't ditch third-party cookies in Chrome after all by frollogaston on Tuesday April 22, 2025 @08:08PM (#43767482)
Is there a legitimate use case for 3P cookies?
Re:Google won't ditch third-party cookies in Chrome after all by paulryanrogers on Tuesday April 22, 2025 @08:14PM (#43767521)
Yes. My employer uses them to facilitate a widget that site owners can just drop into place. Some of these folks are using platforms they cannot easily change or customize, and/or they cannot manage sophisticated changes.
Re:Google won't ditch third-party cookies in Chrome after all by frollogaston on Tuesday April 22, 2025 @09:05PM (#43767740)
Ah, and I'm guessing this could instead be done with an iframe but it would be ugly.
Re:Google won't ditch third-party cookies in Chrome after all by winrid on Tuesday April 22, 2025 @10:06PM (#43768050)
It would still require 3P cookies.
Re:Google won't ditch third-party cookies in Chrome after all by ferngodfather on Tuesday April 22, 2025 @08:12PM (#43767508)
Cross domain same identity authentication, but this has been worked around in most cases.
Re:Google won't ditch third-party cookies in Chrome after all by djfivyvusn on Wednesday April 23, 2025 @04:23AM (#43769790)
Only in places where you trust the domains.
Re:Google won't ditch third-party cookies in Chrome after all by asddubs on Tuesday April 22, 2025 @08:31PM (#43767590)
seamless comment form iframe embeds. Useful for something like blogger, where *.blogspot.com allows user code and thus cannot host the comment form for logged in users
Re:Google won't ditch third-party cookies in Chrome after all by AlienRobot on Tuesday April 22, 2025 @09:13PM (#43767785)
There is an absurd amount of additional complexity that needs to be centralized in order to avoid third-party cookies.

Any website can add Google Analytics by copy and pasting 1 line of code. To avoid this cookie, you need to have your own analytics web app. This makes sense for medium-size websites, but if you have a small website your host will probably bill it as a separate website.

First-party comments? Now you need your own comment system, which means you have a long list of responsibilities that you simply wouldn't have if you just used Disqus or Facebook comments. All those spam links to virulent sites will be on your servers now.

Honestly, the Internet would be a much more awesome place if 3P cookies were the norm and everyone was okay with embedding everything everywhere. In the past hotlinking was a problem due to bandwidth concerns, but nowadays most of the traffic is bots anyway so it would be a drop in the bucket.

Re:Google won't ditch third-party cookies in Chrome after all by djfivyvusn on Wednesday April 23, 2025 @04:25AM (#43769805)
Disqus hasn't needed third party cookies for a long time.
Re:Google won't ditch third-party cookies in Chrome after all by frollogaston on Wednesday April 23, 2025 @11:49AM (#43773500)
This was the example I thought of too. Somehow they got around it, I thought using iframes or whatever is the newer replacement for them.
Re:Google won't ditch third-party cookies in Chrome after all by frollogaston on Wednesday April 23, 2025 @04:03PM (#43776102)
Then again I'm surprised by something broken in iframes every single time I use them, and last time was years ago, so...
Re:Google won't ditch third-party cookies in Chrome after all by codedokode on Wednesday April 23, 2025 @02:59PM (#43775515)
> First-party comments? Now you need your own comment system

This is incorrect. Without 3P cookies widgets like Disqus cannot track (and automatically sign-in) user across different websites, but everything else including posting comments or liking them should work, you just need to sign-in on every website instead of doing it once.

> Any website can add Google Analytics by copy and pasting 1 line of code.

Again incorrect. Google Analytics doesn't need 3P cookies to count the number of visitors. Without 3P cookies it is just harder to correlate visits across different websites, which is what website owners don't really need, why are you supposed to know what competitor sites your users visit? None of your business.

And for cross-site authoriation there are standards like OpenID. So we could disable 3P cookies right now and Internet will work just fine.

Re:Google won't ditch third-party cookies in Chrome after all by AlienRobot on Wednesday April 23, 2025 @03:10PM (#43775635)
>Without 3P cookies widgets like Disqus cannot track (and automatically sign-in) user across different websites, but everything else including posting comments or liking them should work, you just need to sign-in on every website instead of doing it once.

I feel like I don't understand what a 3P cookie is, then. Isn't Disqus a third-party service? Doesn't it use a cookie to know you have signed in?

If you put a Disqus comment form or Google Analytics in your website, wouldn't you need a cookie popup to comply with GDPR and similar regulations that regulate sending user data to third-parties?

Is 3P cookie supposed to be about the domain of the cookie? But then can a script from one domain like GA set a cookie in a different domain like of a website that uses GA? That doesn't sound right, considering you can't do this server side.

Can you help me understand how would it work for it not to be a 3P cookie?

Re:Google won't ditch third-party cookies in Chrome after all by codedokode on Wednesday April 23, 2025 @04:41PM (#43776417)
> Isn't Disqus a third-party service? Doesn't it use a cookie to know you have signed in?

Let's say Disqus JS code is embedded on a site A. Then it can set cookies for that domain. So when you enter your Disqus login and password on site A, it can send a request to Disqus server, obtain authorization token and save it in cookies for domain A. This way you will be recognized every time you visit site A.

This means that operators of site A may access those cookies too, but I don't see any problem here - it's their site anyway.

> If you put a Disqus comment form or Google Analytics in your website, wouldn't you need a cookie popup to comply with GDPR and similar regulations that regulate sending user data to third-parties?

Probably you need.

> Is 3P cookie supposed to be about the domain of the cookie?

3P cookie means that when site A includes content from site B (image, iframes) then the browser will send domain B's cookies with the request for that content. This means that if content from site B is included on 100 different websites, site B can track the user across them using cookies.

So when you sign into Disqus, it can recognize (and track your actions) you on any site using Disqus widget.

When 3P cookies are disabled, requests for content embedded from other sites like B, will be anonymous and without cookies. You will have to log into Disqus for every site where you want to leave a comment.

Re:Google won't ditch third-party cookies in Chrome after all by AlienRobot on Wednesday April 23, 2025 @06:14PM (#43777234)
I see. That's a bit ironic. Cookies use useful because you don't need to use URL query parameters all the time. So what they are doing is taking the session token that would be sent in the Disqus domain cookie and storing it as an embedder's cookie, then using Javascript to put the cookie data in URL's / requests. In fact, "cookie" is probably not even a good method to do this since it will get send in embedder's requests. You could just use localstorage for it.

I've always found the negative effects of 3P cookies, the creepiness of being logged in on every site and ads following you around, to be symptoms of other problems (using the same browser profile for everything you do, a culture of not paying for websites so they have to rely on ads for monetization), so I'm not sure if this is a great solution to the actual problems.

But I guess it does make the internet better for the average person.

Re:Google won't ditch third-party cookies in Chrome after all by frollogaston on Sunday May 04, 2025 @01:18AM (#43884662)
It's not surprising that there are legit uses like this for 3P cookies, and that the cons probably outweigh the pros. Browsers already stopped allowing cross-site caching for similar reasons years ago, which I'd say comes at a bigger cost.
Re:Google won't ditch third-party cookies in Chrome after all by bawolff on Tuesday April 22, 2025 @09:30PM (#43767891)
Lots of the usecases for CORS are also use cases for third party cookies (anytime you set withCredentials = true)
Re:Google won't ditch third-party cookies in Chrome after all by rukuu001 on Tuesday April 22, 2025 @08:19PM (#43767538)
Re the supermarkets - I understand this happens in a limited way already with bluetooth scanning :/
Re:Google won't ditch third-party cookies in Chrome after all by pests on Tuesday April 22, 2025 @08:27PM (#43767572)
Not anymore since most devices now randomize any Bluetooth identifiers like they do MAC address. Might be a few scenarios it’s possible but it’s been locked down since it made major headlines years ago.
Re:Google won't ditch third-party cookies in Chrome after all by rukuu001 on Tuesday April 22, 2025 @09:56PM (#43768005)
Your phone yes, but I believe there's still issues with peripheral BT devices
Re:Google won't ditch third-party cookies in Chrome after all by meattle on Tuesday April 22, 2025 @09:52PM (#43767983)
And cameras…
Re:Google won't ditch third-party cookies in Chrome after all by tmpz22 on Tuesday April 22, 2025 @07:33PM (#43767287)
Blaming privacy violations on cookies has been an absolute masterclass in public relations and is probably the greatest innovation of FANNG.
Re:Google won't ditch third-party cookies in Chrome after all by devrandoom on Tuesday April 22, 2025 @07:58PM (#43767427)
Yep. It's all on the diabolical cookies.
Re:Google won't ditch third-party cookies in Chrome after all by Henchman21 on Tuesday April 22, 2025 @08:07PM (#43767473)
Man this reminds me a lot of bank fraud, er… I meant “identity theft”!
Re:Google won't ditch third-party cookies in Chrome after all by matthewdgreen on Tuesday April 22, 2025 @08:17PM (#43767533)
As another user notes above, there are relatively few applications of 3rd party cookies that aren’t a direct privacy violation or that can’t be realized some other way. If the manufacturer installed a special slot on your car that was explicitly designed so that anyone could install a tracking device, the first thing you’d probably do is fill that slot up with epoxy. But when we discuss simply removing that slot as a manufacturer default, everyone on HN is suddenly up in arms: “why are you blaming the third party tracking slot!? The slot itself isn’t what’s tracking you.”
Re:Google won't ditch third-party cookies in Chrome after all by orangecat on Tuesday April 22, 2025 @08:32PM (#43767599)
Right. Disabling third party cookies is the first thing I do with any browser (the second being uBlock Origin), and it's caused problems on exactly one site that I can recall over the last several years.
Re:Google won't ditch third-party cookies in Chrome after all by timewizard on Tuesday April 22, 2025 @09:07PM (#43767754)
That's because Safari made that default years ago and we've all built workarounds for this anyways. Due to the proliferation of JavaScript and it's being default enabled on all sites or they _will_ break... and the ease of setting up APIs in the cloud.. your privacy settings really don't matter much anymore anyways.

Likewise "autoplay blocking" isn't too hard to overcome. It's more out of politeness that it's ever honored.

Re:Google won't ditch third-party cookies in Chrome after all by Yeul on Wednesday April 23, 2025 @03:40PM (#43775903)
I have two browsers on my phone. One is locked down and the other one is vanilla for those rare cases when I absolutely need to experience the internet as intended.
Re:Google won't ditch third-party cookies in Chrome after all by nicce on Tuesday April 22, 2025 @08:28PM (#43767581)
> They expire on their own.

I have been looking them and yes, in 50 years…

Re:Google won't ditch third-party cookies in Chrome after all by immibis on Wednesday April 23, 2025 @05:27AM (#43770155)
"Sawdust in bread is much maligned these days, but to defend it a little bit, the alternatives are almost universally worse for your health. Sand? Dog poop? Arsenic?"
Re:Google won't ditch third-party cookies in Chrome after all by chii on Wednesday April 23, 2025 @08:50AM (#43771525)
well if you want cheap bread, something has got to give.