Reputation: 340
Both of these approaches end up in a max-age/expiry only 7 days in the future.
document.cookie = "testCookie=value; max-age=999999999";
document.cookie = "testCookie=value; expires=Fri, 31 Dec 9999 23:59:59 GMT";
I've also tried different values with both approaches and various cookie libraries to no joy.
Upvotes: 4
Views: 1967
Reputation: 11
In new versions of browsers such as Chrome, a maximum limit of 400 days was set for the age of cookies.
Upvotes: 1
Reputation: 340
Turns out this is intended behaviour in the Brave browser. See #3443 for more info
Upvotes: 10