Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I am logged into Gmail and I quit my browser, then reopen it, I expect to find that I am no longer logged in. This is the way it used to behave.

Now unless I explicitly log out, it brings me right back to my inbox.

I have not checked "stay signed in" at the Gmail login screen, and I've set Firefox to delete all cookies when I close the browser. What else do I need to do?

I'd accept a browser-based solution for this, but I'd really prefer an account setting in Gmail so that it applies to all machines and browsers that I may use.

I think this problem could be described as "how can I ensure that session cookies are deleted when the browser is closed". That would fit with the original idea of session cookies: they are for a single session.

How can I keep Gmail from maintaining my session?

share|improve this question
As it happens, I use Chrome and Firefox on Mac, Windows and Linux, depending on where I am. I currently care most about this behavior in Firefox for Mac. – Nathan Long Aug 17 '12 at 18:31
If your browser is really set to delete all cookies upon closure, then you wouldn't still be logged into Gmail after you start up again. You should probably double-check that you set this properly, and also check the Privacy -> Remove Individual Cookies dialog to see whether you have any cookies set upon startup. – jjlin Aug 17 '12 at 18:42
@jjlin - the settings look fine. In Firefox on Mac, I just logged into Gmail, chose 'Quit Firefox', and verified in Activity Monitor that it's no longer running. Open it back up and I'm still logged in. Under Firefox > Preferences > Privacy, I have checked "Clear history when Firefox closes." In the "Settings" next to that, both "Cookies" and "Active Logins" (which I would have thought were session cookies) are checked. – Nathan Long Aug 17 '12 at 19:17
When I log into Gmail there's an option to keep me logged in, just make sure it's unchecked before you submit. – martineau Aug 17 '12 at 19:18
Nathan Long - You don't mention whether any of your Tabs/Windows are restored upon restart of Firefox. If they are, then the why is likely due to the design of the Session Restore feature. – user66001 Jul 15 '13 at 0:07
up vote 14 down vote accepted

Change back to the old default behavior

Aha! As this blog post documents (inspired by this podcast):

It appears that for a while now, both Firefox and Chrome have, for the convenience of their users, restored session cookies between browser shut down and restart. This is convenient, but insecure. Only persistent cookies should restore in this way. A common example of the usage of persistent cookies is when you check “keep me logged in” or “remember me” when logging into a site.

Neither Mozilla nor Google seem inclined to revert to the correct secure behavior that IE has kept.

A case where IE is right! Egads, where are my heart pills!?

Here's how he shows to fix it.


Browse to about:config, enter ‘sessionstore’ in the search box, and change browser.sessionstore.privacy_level from 0 to 2.


Under "On Startup", don't select "Continue where I left off". Also:

Browse to chrome://flags, Press CTRL-F and enter ‘disable better’ to jump to the “Disable Better session restore” flag. Enable it.

For latest chrome version > 33. you need to open chrome://settings/content and select 'Keep local data only until you quit your browser' also in chrome://settings make sure option Continue running background apps when Google Chrome is closed is unchecked otherwise chrome will keep running in background and will not delete cookies

share|improve this answer
This doesn't work for Firefox 31.0 (for Ubuntu at least). – Robin Manoli Mar 10 '15 at 20:50
In firefox 44+ it doesn't work. i.e. setting the flag in 2 has no effect. Exiting Firefox with a gmail (or docs, keep, etc) session active, and then launching again, reopens the session (you are still logged in) as if nothing happened. This is a severe security issue! – DiegoDD May 2 at 17:22

Do you maybe have GMail pinned as "App Tab"? At least in Firefox, pinned App Tabs do not obey any automatically remove private data settings. Firefox remembers the current state of the tab and restores it when you open up the browser again.

Maybe you simply unpin GMail and set it as "hompage"?

share|improve this answer
I do not have it pinned. – Nathan Long Aug 17 '12 at 19:23

You must log in to answer this question.

protected by Community Sep 24 '15 at 18:26

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .