How can I make my script respect cookie opt-out?

103 Views Asked by At

I have a script that will be installed on various sites. It uses cookies to store preferences, and localstorage to cache json.

How can I make my script respect the various cookie consent banners that sites have installed? Do these cookie consent banners block cookies automatically (making it so I don't need to do anything), or do they use some flag (such as a cookie) to signal that the user has not opted in or has opted out? Is there a standard way to signal lack of consent that I can use?

Some sites that use my script will have cookie consent systems, but some won't, so I can't just look for an opt-in, as sites that have no opt-in system will always seem to lack user consent.

0

There are 0 best solutions below