Menu
I am trying to use the following function to delete a cookie. However, I am unclear as to what would be the path and what would be the domain. Can someone give me an example?
/**
* Deletes the specified cookie.
* name name of the cookie
* [domain] domain of the cookie (must be same as domain used to create cookie)
function deleteCookie(name, path, domain)
{
if (getCookie(name))
{
document.cookie = name + “=” +
((path) ? “; path=” + path : “”) +
((domain) ? “; domain=” + domain : “”) +
“; expires=Thu, 01-Jan-70 00:00:01 GMT”;
}
}