Clear cookie via jquery?
asp.net, cookies, javascript, jquery
Solution
Sure, Using cookie plugin like this
$.cookie("name", null);
Update:
if($('a[href="webiste.co.uk\/en-gb\/admin.aspx"]').length) {
$.cookie("name", null);
}
Update 2: Pure Js
function deleteCookie(name) {
document.cookie = name+'="";-1; path=/';
}
var login = document.getElementById("loginlink");
login.onclick = function() {
deleteCookie("name");
};
Problem
I have a DNN installation but one of the portals is broken and the "logout" button doesnt seem to clear the cokoie. Is it possible to use jquery to clear a specific cookie? or a seperate ASP.NET page?