tags:

views:

74

answers:

1

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
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