If you write cookie from ASP.Net code behind and try to delete from JavaScript client side, you may notice that even when you set the expire day to past, it is not actually deleting the cookie. The reason being cookie string used in JavaScript to delete it must match EXACTLY with the cookie string sent by ASP.NET to save it.
ASP.Net sends cookie as
login=myloginvalue; expires=gmtdate; path=/
So if you have to delete it, You have to write the following JavaScript to delete the cookie:
var expires = new Date();
expires.setUTCFullYear(expires.getUTCFullYear() - 1);
document.cookie = 'login=; expires=' + expires.toUTCString() + '; path=/';
This works with both IE and Firefox. Thanks to Henri to post this solution :)