Prevent a cookie from expiring when the browser is closed?

2

How do I prevent cookies from expiring when my browser is closed?

user541686

Posted 2011-09-10T20:57:48.570

Reputation: 21 330

Answers

3

You can't. Those cookies are set that way for security. If you are asking about how to set a cookie's expiration date on your own site, then see these PHP and Javascript methods.

jsejcksn

Posted 2011-09-10T20:57:48.570

Reputation: 2 854

By "you can't" do you really mean "you shouldn't"? Or do you mean "it's impossible"? – user541686 – 2011-09-13T04:53:42.347

1I mean that some sites employ not only timeouts for validating cookies, but a hashed value that also has a server-side timeout value that will no longer authenticate no matter what the local timeout value is. – jsejcksn – 2011-09-15T21:51:10.007

3

RedGrittyBrick

Posted 2011-09-10T20:57:48.570

Reputation: 70 632

Awww... it doesn't seem to work with my version of Chromium. :( But +1 thanks anyway, I'll give it a try later if I can. – user541686 – 2011-09-13T04:54:15.263