Javascript Cookie with no expiration date

cookiesjavascript

I would like to set up a cookie that never expires. Would that even be possible?

 document.cookie = "name=value; expires=date; path=path;domain=domain; secure";

I don't want to make the date really large, I am just wondering if there was a value for the expires parameter on the cookie that told it never to expire.

Thanks.

Best Answer

Nope. That can't be done. The best 'way' of doing that is just making the expiration date be like 2100.