[Guide] Firefox - Keep Cookies for Specific Websites


Recommended Posts

Firefox - Keep Cookies for Specific Websites

About This Guide

This guide will show you how to configure Mozilla Firefox to keep cookies for specific websites only and delete the rest.

Why would I want to do this? This helps you to balance convenience, security, and privacy. It's convenient because it allows you stay logged into websites of your choosing. It also lets you keep cookies which store settings or opt-out cookies. It provides security because it will log you out of all other websites when you close the browser. It provides extra privacy from things like tracking cookies, which monitor your activities around the web. These cookies will be deleted everytime you close Firefox.

Configure Settings

First, you have to ensure a few settings are configured properly, else things may not work properly.

If using Firefox 3.x, open Tools -> Options on the menu bar.

If using Firefox 4.x, click the main menu and click Options.

1.

In the Options dialog, click the Privacy tab.

In the first dropdown menu, choose Use custom settings for history.

post-57213-12878745878623.png

2.

Look for the checkbox that says Clear history when Firefox closes.

If this box is unchecked, then you can skip to step 4.

But if this box is checked, then click the Settings button to the right.

post-57213-12878745994309.png

3.

In this dialog, make sure Cookies is unchecked and click OK.

If this is not disabled, then Firefox will delete all cookies when closing the browser. So this option must be disabled.

post-57213-12878746071257.png

4.

Make sure the option Accept cookies from sites is checked.

In the second dropdown, next to where it says Keep until, choose I close Firefox in that list.

post-57213-1287874614993.png

Choose Websites to Keep Cookies For

Now that Firefox is properly configured, you just have to choose the websites which you want to keep cookies for. There are two different methods you can use.

Method 1: Exceptions List

Open up the Options dialog, click the Privacy tab, and click the Exceptions button.

post-57213-12878760049068.png

From this dialog, you can manually enter websites to keep cookies for.

Type in the website you want to add, and click the Allow button.

post-57213-12878746254352.png

Method 2: Page Info

Open up the website that you want to keep cookies for.

Right click anywhere on the page and click Page Info.

Alternatively, you can choose Tools -> Page Info.

post-57213-12878746372673.png

Click the Permissions tab.

Under where it say Set Cookies, uncheck Use Default.

To the right, choose to Allow cookies for this site.

post-57213-12878760825524.png

Extra Notes

Firefox may not delete all of your cookies if your homepage is set to "Show my windows and tabs from last time". By following this guide, you are configuring Firefox to delete the cookies at the end of the session. When this is set as your homepage, it is resuming your previous session. I'm not sure why only some cookies are kept and others are deleted though.

post-57213-12899549368273.png

Nov 16 2010 - Added extra note about setting homepage

Edited by Xinok
  • Like 1

There's no need to check "Clear history when Firefox closes". That step is useless for keeping the cookies.

All you need to do is select the "Close Firefox" in the "Keep until:" selection and add the sites you want to keep the cookies of in the exception (mark them under "Allow").

When Firefox will be closed, it will delete all the cookies... except the ones marked under "allow". Here's a proper explanation from back 2008:

http://www.neowin.ne...t__p__589534698

I'm doing that for a long time already but there is something I would like to get rid of...

Each time I visit a webpage with an imgxxx.imageshack.us I get a popup. I tried to enter *.imageshack.us as blocking but it does not work. Anyone know how to do that?

There's no need to check "Clear history when Firefox closes". That step is useless for keeping the cookies.

All you need to do is select the "Close Firefox" in the "Keep until:" selection and add the sites you want to keep the cookies of in the exception (mark them under "Allow").

When Firefox will be closed, it will delete all the cookies... except the ones marked under "allow". Here's a proper explanation from back 2008:

http://www.neowin.ne...t__p__589534698

Some people are going to have this option enabled and want to keep it enabled. This is why I added steps 2 and 3, to ensure that this option doesn't delete your cookies. Step 2 hasn't changed, but I edited it a bit hopefully to make it clearer that if this box is unchecked, you can skip to step 4. Then step 4 tells you to do exactly what you said.

I'm doing that for a long time already but there is something I would like to get rid of...

Each time I visit a webpage with an imgxxx.imageshack.us I get a popup. I tried to enter *.imageshack.us as blocking but it does not work. Anyone know how to do that?

What are you using to block popups from *.imageshack.us? You could try an adblock extension, but you'd have to block the URL of the popup itself, not the website that creates it.

What are you using to block popups from *.imageshack.us? You could try an adblock extension, but you'd have to block the URL of the popup itself, not the website that creates it.

The popup I was talking about was about the cookie, like this one:

18037018.png

Unless I block full imageshack.us I always get such pupop and I block them each time but img range from img0 to img999 so that's a lot to block. I tried to enter *.imageshack.us but it's a no go and like I said if I block imageshack.us it works but for the complete website while I was looking to use imageshack.us for my sessions and only block imgxxx (many of those when browsing here and there).

  • 3 years later...

I've switched from Chrome to Firefox, and I'm looking for an extension in Firefox that can do this easily.

 

For Chrome, it's Vanilla Cookie Manager, as mentioned in the other thread. For the current version, it's very easy: when you visit a site, just click on the extension button in the address bar and select to whitelist the cookies of the site or of the domain.

 

Prior to that, I used CCleaner, but I usually forgot to mark new cookies that I want to keep, so I decided to use the browser extension instead. Since I had a lot of cookies that I wanted to keep, I looked for the configuration file in CCleaner that contained the list of cookies to keep, then copied and pasted it in Vanilla.

  • 3 months later...
  • 8 months later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.