Disabling Cookies

How to disable cookies with Cookie Consent

Whenever you have chosen opt-in or opt-out as your compliance type, you will need to disable cookies on your site depending on the user action.

Disabling cookies should be done with the callback hook:
onInitialise: function (status) { var type = this.options.type; var didConsent = this.hasConsented(); if (type == 'opt-in' && didConsent) { // enable cookies } if (type == 'opt-out' && !didConsent) { // disable cookies } }, onStatusChange: function(status, chosenBefore) { var type = this.options.type; var didConsent = this.hasConsented(); if (type == 'opt-in' && didConsent) { // enable cookies } if (type == 'opt-out' && !didConsent) { // disable cookies } }, onRevokeChoice: function() { var type = this.options.type; if (type == 'opt-in') { // disable cookies } if (type == 'opt-out') { // enable cookies } }

Brought to you by Osano Logo

This website was created by Osano - previously known as SilkTide Cookie Consent and Cookie Consent by Insites. We don't like the EU cookie law, and decided that if we had to comply with it, we may as well create a solution that isn't awful.