I have tested the RESET shortcode on different browsers and different sites. My experience was that if the shortcode was inserted on different (sub)page than the homepage, it does not work. I've made some investigation and find a solution. I had to add the "path=/;" option to delete_cookie function:
function delete_cookie(name, url) {
document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;';
if(typeof url !== 'undefined'){
window.location.href = url;
}else{
location.reload();
}
}
This helped. Because without this at the new, generated cookie the path is not / but the name of the subpage. And this is a different cookie than that one wich we would like to delete.
If you think it is a good solution, please include this fix in the next release.
I have tested the RESET shortcode on different browsers and different sites. My experience was that if the shortcode was inserted on different (sub)page than the homepage, it does not work. I've made some investigation and find a solution. I had to add the "path=/;" option to delete_cookie function:
function delete_cookie(name, url) { document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;'; if(typeof url !== 'undefined'){ window.location.href = url; }else{ location.reload(); } }
This helped. Because without this at the new, generated cookie the path is not / but the name of the subpage. And this is a different cookie than that one wich we would like to delete.
If you think it is a good solution, please include this fix in the next release.