Hi All
I am doing task for deleting cookies in javascript for IE and Mozilla.
for that i written function is
[QUOTE]
function deleteCookie(name, path, domain) {
if (getCookies(name)) {
document.cookie = name + “=” +
((path) ? “; path=” + path : “”) +
((domain) ? “; domain=” + domain : “”) +
“; expires=Thu, 01-Jan-70 00:00:01 GMT”;
}
[B] alert(‘document.cookie value :::::’+document.cookie);
}
function getCookies(name) {
var dc = document.cookie;
var prefix = name + “=”;
var begin = dc.indexOf(“; ” + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
} else
begin += 2;
var end = document.cookie.indexOf(“;”, begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}
in above code, i am getting proper alert with some value. alert is placed at the end of deleteCookie () method.
Now , How i know whether my cookies get deleted or not.I am not sure whether my browser cookies are deleted or not
Is there any test is there from where i can confirm the same.
Any input is highly appreciated.
Regards
Haresh