What can be the maximum acceptable expiry-time value of Javascript persistence cookie?
Read : Expires and Max-Age of Cookies
Life time of the javascript cookies is depend on what amount of time you set when creating cookies for example following set the life time of 10 minutes
expiry = new Date();
expiry.setTime(date.getTime()+(10*60*1000));
// Ten minutes
// Date()'s toGMTSting() method will format the date correctly for a cookie
document.cookie = "visited=yes; expires=" + expiry.toGMTString();
there is no way that you can set the life time coookie...i.e cookie with no expiration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With