I know that I can set expiration date for a cookie, but can I make that cookie would expire after some time OR when browser is closed?
+1
A:
If you set an expiration date, this will set them to expire on that date, whether the browser is open or closed.
Only non persisted cookies will expire once the browser is closed.
See cookie expiration rules on wikipedia.
Oded
2010-03-29 10:02:22
I knew about that. I just came with idea to send multiple cookies one with expiration date and other which expire with user session. Checking both will give me desired result
Sergej Andrejev
2010-03-29 10:56:24