[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

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.
  • Posts

    • Zen Browser 1.21.6b by Razvan Serea Zen Browser is a privacy-focused, open-source web browser built on Mozilla Firefox, offering users a secure and customizable browsing experience. It emphasizes privacy by blocking trackers, ads, and ensuring your data isn't collected. With Zen Mods, users can enhance their browser experience with various customization options, including features like split views and vertical tabs. The browser is designed for efficiency, providing fast browsing speeds and a lightweight interface. Zen Browser prioritizes user control over the browsing experience, offering a minimal yet powerful alternative to traditional web browsers while keeping your online activity private. Zen Browser’s DRM limitation Zen Browser currently lacks support for DRM-protected content, meaning streaming services like Netflix and HBO Max are inaccessible. This is due to the absence of a Widevine license, which requires significant costs and is financially unfeasible for the developer. Additionally, applying for this license would require Zen to be part of a larger company, similar to Mozilla or Brave. Therefore, DRM-protected media won't be supported in Zen Browser for the foreseeable future. Zen Browser offers features that improve user experience, privacy, and customization: Privacy-Focused: Blocks trackers and minimizes data collection. Automatic Updates: Keeps the browser updated with security patches. Zen Mods: Customizable themes and layouts. Workspaces: Organize tabs into different workspaces. Compact Mode: Maximizes screen space by minimizing UI elements. Zen Glance: Quick website previews. Split Views: View multiple tabs in the same window. Sidebar: Access bookmarks and tools quickly. Vertical Tabs: Manage tabs vertically. Container Tabs: Separate browsing sessions. Fast Profile Switcher: Switch between profiles easily. Tab Folders: Organize tabs into folders. Customizable UI: Personalize browser interface. Security Features: Inherits Firefox’s robust security. Fast Performance: Lightweight and optimized for speed. Zen Mods Customization: Deep customization with mods. Quick Access: Easy access to favorite websites. Open Source: Built on Mozilla Firefox with community collaboration. Community-Driven: Active development and feedback from users. GitHub Repository: Contribute and review the source code. Zen Browser 1.21.6b changelog: New Features Updated to Firefox 152.0.5 Fixes Fixed some localization strings not being translated in some places (#10749) Fixed glance being able to be open a second time when it was already open (#14460) Other bug fixes and improvements. Download: Zen Browser | 90.3 MB (Open Source) Download: Zen Browser ARM64 | Other Operating Systems View: Zen Browser Home Page | Screenshots 1 | 2 | Reddit Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • I wonder when they will lay those devs off and retire the product.
    • Jello Reflecting Pool 🤣  
    • PaintFE 1.3.5 is out.
  • Recent Achievements

    • One Year In
      Dřívko earned a badge
      One Year In
    • Dedicated
      Brandon J earned a badge
      Dedicated
    • One Month Later
      Sri Sai Kripa Stone earned a badge
      One Month Later
    • Week One Done
      Sri Sai Kripa Stone earned a badge
      Week One Done
    • Dedicated
      BenTuckett1997 earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      385
    2. 2
      PsYcHoKiLLa
      133
    3. 3
      +Edouard
      119
    4. 4
      Nick H.
      87
    5. 5
      neufuse
      76
  • Tell a friend

    Love Neowin? Tell a friend!