How to disable third party cookies in Firefox

Martin Brinkmann
Nov 3, 2006
Updated • Mar 19, 2019
Firefox
|
3

Cookies are classified as first-party or third-party cookies. First-party cookies are set by sites that you visit actively, e.g. if you load Facebook, all cookies that Facebook sets from its domain Facebook.com are first-party. Any cookie that is set from another domain is considered third-party.

Third-party cookies have a bad reputation as they may be used for tracking purposes. If you visit a website with ads and monitor cookies on your device, you may notice that sites with ads set lots of third-party cookies on average.

Sites may read the cookie when you visit another web page or site that makes the same third-party connections. This allows companies to monitor which sites you visit. Some websites require third-party cookies for functionality on the other hand.

Firefox supports the following functionality in regards to third-party cookies:

  • Block all third-party cookies
  • Block cookies from unvisited websites.
  • Block third-party trackers.
  • Block all cookies.

Current versions of Firefox

firefox-cookies

Mozilla moved cookie management to the Tracking Protection functionality of the Firefox browser. You may still load about:preferences#privacy in the browser's address bar but need to set Content Blocking to custom to access cookie management options now.

Check Cookies under custom once the options are displayed and click on the menu next to the entry to define the cookie types that you want Firefox to block:

  • All third-party cookies -- blocks all non-first-party cookies in Firefox.
  • Third-party trackers -- blocks cookies that come from third-party trackers based on Mozilla's list of third-party trackers.
  • Cookies from unvisited sites -- blocks third-party cookies if you never visited the site before.
  • All cookies -- blocks all cookies.

Old Information kept for archiving purposes

Firefox 60+

firefox 60 cookie management

Mozilla moved cookie management to a different section in Firefox 60.

  1. Load about:preferences#privacy in the browser's address bar.
  2. Locate "Cookies and Site Data", and manage the cookie settings there. They are identical to the ones in previous versions.

Firefox 59 or older

firefox cookies third-party

Load about:preferences#privacy in the Firefox address bar and scroll down to the History section. Make sure to select "use custom settings for history" under "Firefox will".

Firefox accepts cookies (first- and third-party) from websites by default, and keeps them until they expire.

To disable third-party cookies, select "never" for "accept third-party cookies". You may also set it to "from visited" which may reduce the issues that you run into after making the change.

The main difference is the following one: Never blocks any attempt to set third-party cookies but "from visited" accepts them from sites that you visited actively in the past.

The developers of Firefox removed the option to disable third party cookies in Firefox 2.0 stating the reason that it was not possible to block all third party cookies with this function.

Third Party Cookies are mainly cookies that track user behavior, the big ad networks for instance like to use them a lot.  There are basically two options to disable third party cookies in Firefox.

The first would be to disable it manually by opening about:config from the address bar. Search for network.cookie.cookieBehavior and take a look a the value.

If it is set to 0 you accept all cookies, 1 means you only accept cookies from the same server, 2 means you disable all cookies. Setting it to 1 has the same effect that the option in the old preference in the Firefox browsers had: it disables third party cookies.

third party cookies firefox

You can also install an add-on that blocks third party cookies automatically in the browser. One of the many extensions that you can install in the web browser is Self-Destructing Cookies. It accepts all cookies by default, but will delete them as soon as you close the tab so that they cannot be used to track you. You can whitelist cookies that you do not want deleted. Note that this does not cover first party cookies as they are often set by sites to save important information such as login session data or site preferences.

Update: The option to disable third party cookies is now available again in the Firefox web browser. All you need to do is open the browsing options by clicking on Firefox and then on options in the menu that pops up.

Switch to the privacy tab in the options and locate the Accept cookies from sites listing. Underneath, you find a setting to accept third-party cookies. If you uncheck that box, Firefox will no longer accept third party cookies at all. You can alternatively configure the browser to keep third party cookies until their expire, until you close the browser, or define the action on a per-cookie basis with prompts when they are set.

Update 2: Mozilla will introduce automatic third party cookie blocking in Firefox 22 as it stands right now. This blocks all third party cookies if you have not visited the website of the company or server that tries to set the cookie before.

Summary
How to disable third party cookies in Firefox
Article Name
How to disable third party cookies in Firefox
Description
Cookies are classified as first-party or third-party cookies. First-party cookies are set by sites that you visit actively, e.g. if you load Facebook, all cookies that Facebook sets from its domain Facebook.com are first-party. Any cookie that is set from another domain is considered third-party.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. brian said on February 7, 2012 at 11:33 am
    Reply

    for firefox 10.0 cookie safe is not available

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.