Skip to content

Instantly share code, notes, and snippets.

@AdamMadrzejewski
Created September 11, 2015 15:43
Show Gist options
  • Save AdamMadrzejewski/a11a663a6e2f90f030e9 to your computer and use it in GitHub Desktop.
Save AdamMadrzejewski/a11a663a6e2f90f030e9 to your computer and use it in GitHub Desktop.
Prevent all cookies from being set
Object.defineProperty(document, 'cookie', {
get: function () { return ''; },
set: function () { console.warn('Cookie prevented from being set. Please accept cookie privacy police first and refresh the page.'); }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment