Hey @nuovaera,
thank you for your code! There was just a little error in it. You used the wrong tokens.
That’s how the code is right and working:
function delete_cookie(name, url) {
document.cookie = "ginger-cookie=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
if(typeof url !== 'undefined'){
window.location.href = url;
}else{
location.reload();
}
}
EDIT: When reloading on the same page, the cookie banner didn’t appear all the time. For now i add a string to the reload url [ginger_reset_cookie text=”Reset der Cookie-Einstellungen ” redirect_url=”MYURL/datenschutzbestimmungen/?ginger-reload“]
-
This reply was modified 6 years, 4 months ago by SimonNo.