this is my first post but I was a little unclear about formatting after reading the other posts about this. Below is my Javascript code, I am trying to set the longest possible expiration date.
function setCookie(cname, cvalue) {
var expires = "expires=" + new Date(2147483647 * 1000).toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
}
Is this correct?
Do I put:
"expires=" + new Date(2147483647 * 1000).toUTCString();
or just
"expires=" + "2147483647";