1function deleteCookie(name) {
2 document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
3}
1//set the vvalue to EMPTY, and the date to an already PASSED one.
2document.cookie = "cookiename= ; expires = Thu, 01 Jan 1970 00:00:00 GMT"
1document.cookie = 'my_cookie=; path=/; domain=.example.com; expires=' + new Date(0).toUTCString();