How to Delete / Remove Stored Cookie using Javascript

by Dinesh 2014-05-31 16:17:15

The following simple javascript that deletes stored cookies in a browser.
 
function setCookie(c_name,value,1) {
    document.cookie = c_name + "=" +escape(value);
}
setCookie('cookie_name',mac);


function eraseCookie(c_name) {
    createCookie(cookie_name,"",-1);
}

Tagged in:

1150
like
0
dislike
0
mail
flag

You must LOGIN to add comments