How to block cookies using JavaScript?
Blocking third-party cookies set with JavaScript. To block third-party cookies, find a JavaScript code that is setting third-party cookies and: change type attribute from text/javascript to text/plain (if type attribute missing, just add it) add data-cookiescript attribute and set it to accepted.
How do I block cookies on GDPR?
To automatically block the scripts of the cookies installed by these services using the GDPR Cookie Consent plugin, go to GDPR Cookie Consent > Script Blocker > Scripts tab. This will take you to the Manage Script Blocking page as shown in the screenshot below.
How to block cookies in PHP?
Step 1: Don't execute the third party script code. Step 2: Show the cookie banner. Step 3: Wait until user accepts, now you can execute the third party script code.. Worked for me.