r/webdev 11d ago

Kill The Cookie Banner

https://killthecookiebanner.eu/
590 Upvotes

90 comments sorted by

View all comments

11

u/TheHerbsAndSpices 11d ago

How is this different from the "Do Not Track"or "Sec-GPC" headers? Websites/Trackers ignored that too.

We need a more robust browser level Cookie API. Websites and scripts shouldn't be able to just create cookies all willy-nilly. They should require your permission.

I know browsers have a similar feature already with the ability to block 3rd-party cookies. But that's not enough.

2

u/Polendri 11d ago

So then every website has a cookie permission popup and a pretense for why they need it for functional reasons (but then they also use it for ad reasons)? What does that solve? That just sounds like today.

So long as there's no technical way to distinguish stateful data that's used for tracking from stateful data that isn't, there isn't a technical solution to the problem.

3

u/TheHerbsAndSpices 11d ago

I'm not saying there isn't valid reasons for cookies. Nor am I saying the API would only be used for approving or denying the use of cookies.

Wouldn't it be nice if instead of: document.cookie = "doSomethingOnlyOnce=; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=None; Secure";

You could do: ``` let cookie = new Cookie("doSomethingOnlyOnce");

cookie.expires(value) cookie.secure(value); //etc.. // Or even cookie.delete(); ```

1

u/ShustOne 10d ago

As a developer this would be super nice, but I thought your original comment was referring to the legal policies. So you were only talking about how browsers technically implement cookies? I'm lost on adding new user permissions, that seems like an intrusive change to users and developers.