We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Is there a way to clear cookies when browser is closed and still keep logged in websites like youtube, facebook, twiter...?

more options

I love the ability to see and manage each cookie that is stored while browsing. But every time I close Firefox I get automatically logged out from sites such as facebook, youtube, twiter... I've been trying out changing the settings and figured that I have to choose to either delete cookies and get automatically logged out or keep my sessions logged but not erasing cookies whenever I close Firefox.

My question is, is there a way to keep erasing cookies but keep the ones that make me stay logged in those websites?

I love the ability to see and manage each cookie that is stored while browsing. But every time I close Firefox I get automatically logged out from sites such as facebook, youtube, twiter... I've been trying out changing the settings and figured that I have to choose to either delete cookies and get automatically logged out or keep my sessions logged but not erasing cookies whenever I close Firefox. My question is, is there a way to keep erasing cookies but keep the ones that make me stay logged in those websites?

All Replies (3)

more options

Your ‘logged-in’ status is stored in special cookies. If the cookie is removed, you are logged out.

Type about:preferences#privacy<enter> in the address bar. The button next to History, select Use Custom Settings.

At the bottom of the page, turn on Clear History When Firefox Closes. At the far right, press the Settings button. Turn on ONLY Cache and Form And Search History leaving the others off.

Note: Active Logins are the special cookies.

more options

You need to use "Delete cookies and site data when Firefox is closed" to let cookies expire automatically in case you want to keep cookies with an allow exception. If you use "Clear history when Firefox closes" then all cookies are cleared regardless of an exception.

  • clearing "Site Preferences" clears exceptions for cookies, images, pop-up windows, and software installation and exception for password and other website specific data
  • clearing "Cookies" will remove all selected cookies including cookies with an Allow exception you may want to keep

Modified by cor-el

more options

Here's a picture to go with the first part of cor-el's reply: