Delete a Cookie with JavaScript
Advertisements
To delete a cookie, you just have to set the expires parameter to a passed date. Simple.
document.cookie = "username=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
Advertisements