Search code examples
javascriptsessiongoogle-chromecookies

Chrome doesn't delete session cookies


I'm trying to set session cookie in javascript like this:

document.cookie = 'name=alex; path=/'

But Chrome doesn't delete it even if I quit browser and launch it again.

I checked in Firefox and Opera and both work as intended - they delete session cookie on browser exit.

Is Chrome just ignoring expiration rules?

I checked in multiple OSes and found out that session cookie gets removed on Chrome in Windows XP and Ubuntu, but NOT in Mac OSX Lion.


Solution

  • This can be caused by having Chrome set to Continue where you left off.

    enter image description here

    Further reading