I'm trying to set a session cookie in javascript, like this:
document.cookie = 'name=alex; path=/'
But even if I quit the browser and start it again, Chrome won't delete it.
I checked in Firefox and Opera and both work as expected - they delete the session cookie when the browser exits.
Did Chrome just ignore the expiration rule?
I checked in multiple operating systems and found that session cookies are deleted in Chrome on Windows XP and Ubuntu, but not on Mac OSX Lion.
I just ran into the same problem, a cookie was set to expire "at the end of the browsing session".
Unfortunately, it didn't expire, so I made some adjustments in my browser's settings.
It turns out that the ability to remember open tabs when the browser is closed is the source of the problem. (This feature is called "On startup" - "Continue where you were" on current versions of Chrome).
This problem also occurs in Opera and Firefox.
This may be caused by setting Chrome tocontinue where you left off.
Further reading