Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't set a cookie to expire more than a week away

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.

like image 636
ChildishGiant Avatar asked Sep 05 '25 03:09

ChildishGiant


1 Answers

Turns out this is intended behaviour in the Brave browser. See #3443 for more info

like image 145
ChildishGiant Avatar answered Sep 07 '25 19:09

ChildishGiant



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!