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

Can I keep two cookies in Firefox if I delete all upon closing?

more options

In "Options > Privacy & Security > History ", in the "Firefox wIll" drop-down menu I have "use custom settings for history", I have checked "Accept cookies from websites" and in the "Exceptions" window I have two websites set to Allow status:

https://Google.com https://store.steampowered.com/


When I open Firefox I have to log into these websites, why?

In "Options > Privacy & Security > History ", in the "Firefox wIll" drop-down menu I have "use custom settings for history", I have checked "Accept cookies from websites" and in the "Exceptions" window I have two websites set to Allow status: https://Google.com https://store.steampowered.com/ When I open Firefox I have to log into these websites, why?

All Replies (3)

more options

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

Turn on Remember My Browsing And Download History 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.

more options

So I can't keep just two cookies then, I have to keep them all, right?

Modified by LAPIII

more options

The method I use, which is built-in, is to set all cookies to expire naturally when I exit Firefox. If there are cookies I do NOT want to expire, I create an exception so those sites are allowed to set persistent cookies. There are less than a dozen. Then I do not set Firefox to clear cookies when I closes. Here's how that is set up:

Go to privacy settings:

  • Windows: "3-bar" menu button (or Tools menu) > Options
  • Mac: "3-bar" menu button (or Firefox menu) > Preferences
  • Linux: "3-bar" menu button (or Edit menu) > Preferences
  • Any system: type or paste about:preferences into the address bar and press Enter/Return to load it

In the left column, click Privacy & Security

On the right side, if you don't have "Firefox will: Use custom settings for history", select that option. Now you can customize

☑ Accept cookies from websites (selected)
Accept third-party cookies: Always
Keep until: they expire I close Firefox
☐ Clear history when Firefox closes (not selected -- or in Settings, don't select Cookies)


When creating "Allow" exceptions, you need to include the protocol used by the site (http or https). So for example:

You can also use the Permissions panel of the Page Info dialog to create exceptions. While you are on the site where you want an exception, you can call that up using any of these:

  • right-click a blank area of the page and choose View Page Info > Permissions
  • (menu bar) Tools menu > Page Info > Permissions
  • click the padlock or "i" icon to the left of the site address, then the ">" icon, then More Information > Permissions

Scroll down to "Set Cookies" and uncheck the "Use default" box, and then select the permission you prefer (Allow in this case).

This dialog saves as you go, so you can close it after that.

Sometimes that doesn't work right because the site uses multiple servers (e.g., accounts.google.com and mail.google.com) and the cookies are set on the base domain (e.g., google.com). So in that case you still need to create the exception by hand.