Eoin
Eoin

Reputation: 1493

After a user opts out of Cookies, can I remove the cookie?

I visit the Information Commissioners Office (ICO) https://ico.org.uk/ which is the commissioner who is in charge of things like GDPR and cookies in the UK.

They have the option to opt out of cookies, which I duely did. I then refreshed and I could still see cookies being load for Google Analytics.

A few days later I returned and the cookie must have expired. Were my original findings due to browser cache? And if so, is there a way to force browsers to forget cookies? I would find this more compliant with the users wishes.

I think if a cookie can expire, then perhaps you could set the expiry date to now when a user opts out. Or set the cookie to 1900 or something similar so it expires. Or set it to null if that would make a difference.

Is it possible to remove a cookie instantly when a user opts out, or is that entirely down to the browser settings?

Upvotes: 1

Views: 961

Answers (2)

ktowndown
ktowndown

Reputation: 1

While it is possible to do, it's worth noting that removing existing cookie(s) is not a requirement if consent is removed.

The cookies themselves do not send data to third parties, so they are not the issue. One only needs to disable the script, SDK or pixel that is sending data (including cookie value(s)) to the third party.

Upvotes: 0

Synchro
Synchro

Reputation: 37700

Yes. To force a cookie to expire, return one with your response with a matching path and name, but an expiry time in the past. The browser will consider it expired and delete it.

Pretty much every site using Google Analytics is going to be betraying your wishes (and breaking the law, at least in the EU), since that's what it's default configuration does, and it's very rare than anyone changes it to anything else.

Upvotes: 2

Related Questions