Jump to content



Photo

[Guide] Firefox - Keep Cookies for Specific Websites


  • Please log in to reply
14 replies to this topic

#1 +Xinok

Xinok

    Resident Reresident

  • 3,501 posts
  • Joined: 28-May 04
  • Location: Shikaka
  • OS: Windows 7 x64
  • Phone: Galaxy S3

Posted 23 October 2010 - 23:27

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.

firefox 01.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.

firefox 02.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.

firefox 03.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.

firefox 04.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.

firefox exceptions button.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.

firefox 05.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.

firefox 06.png


Click the Permissions tab.
Under where it say Set Cookies, uncheck Use Default.
To the right, choose to Allow cookies for this site.

firefox 07.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.

Home Page.png


Nov 16 2010 - Added extra note about setting homepage

Edited by Xinok, 17 November 2010 - 00:54.



#2 +FiB3R

FiB3R

    "the sun is definitely rising on a new dawn!"

  • 7,604 posts
  • Joined: 06-November 02
  • Location: SE London
  • OS: Windows 8.1 Enterprise
  • Phone: Lumia 930

Posted 23 October 2010 - 23:39

Great guide, thank you. :)

#3 SQ1

SQ1

    Neowinian

  • 210 posts
  • Joined: 01-October 04

Posted 23 October 2010 - 23:40

Thanks, this is why i love Firefox ;)

#4 ViZioN

ViZioN

    Resident Scotsman

  • 4,317 posts
  • Joined: 17-January 05
  • Location: Edinburgh

Posted 31 October 2010 - 11:16

Great guide, going to check this out right now. Cheers!

#5 Jebadiah

Jebadiah

    Neowinian Senior

  • 2,209 posts
  • Joined: 08-February 04

Posted 31 October 2010 - 11:51

Excellent guide!

#6 Pupik

Pupik

    Neowinian Senior

  • 6,268 posts
  • Joined: 09-December 05

Posted 31 October 2010 - 12:33

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

#7 ambiance

ambiance

    Identity Thief

  • 1,949 posts
  • Joined: 15-January 04
  • Location: Burlington, Ontario, Canada

Posted 31 October 2010 - 12:38

I just allow certain sites and block every domain.

#8 Rhialto

Rhialto

    the Marvellous

  • 231 posts
  • Joined: 13-December 04
  • Location: Québec, Canada

Posted 31 October 2010 - 13:39

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?

#9 OP +Xinok

Xinok

    Resident Reresident

  • 3,501 posts
  • Joined: 28-May 04
  • Location: Shikaka
  • OS: Windows 7 x64
  • Phone: Galaxy S3

Posted 31 October 2010 - 17:31

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.

#10 sullysnet

sullysnet

    Neowinian

  • 438 posts
  • Joined: 05-December 01

Posted 01 November 2010 - 21:38

Cookie Monster extension is great for this instead of these directions. Also easier :) l also use a clear history extension.

#11 Rhialto

Rhialto

    the Marvellous

  • 231 posts
  • Joined: 13-December 04
  • Location: Québec, Canada

Posted 02 November 2010 - 22:36

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:

Posted Image

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).

#12 Pupik

Pupik

    Neowinian Senior

  • 6,268 posts
  • Joined: 09-December 05

Posted 02 November 2010 - 23:50

By the way. Anyone knows how to achieve the same on Chrome?
Because this is pretty much the only thing that stops me from switching to Chrome from Firefox, as my default browser.

#13 monkeylove

monkeylove

    Neowinian

  • 110 posts
  • Joined: 20-August 11

Posted 11 January 2014 - 06:59

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.



#14 monkeylove

monkeylove

    Neowinian

  • 110 posts
  • Joined: 20-August 11

Posted 12 January 2014 - 10:22

I'm currently trying the Cookie Whitelist add-on.



#15 potwer

potwer

    Neowinian

  • 2 posts
  • Joined: 05-May 14

Posted 09 May 2014 - 13:33

thanks