I know this question has been asked a thousand times but none of the answers really give me what I'm looking for. I am using jQuery cookie to store some information, but I want them to expire when the browser closes. window.unload
is not a viable option (read: doesn't work.)
My question is this: is it actually possible to have the cookies set to expire when the browser closes, like a session? If so, does anyone know how?
Update: Turns out it's quite simple, instead of passing expiry: 0 (which didn't work), just don't pass any expiry at all. Well, this explains why there wasn't many questions.
Thanks all.