Skip to main content

Enable Firefox state partitioning (Total Cookie Protection)

Apply Now
Works with any Linux distroWorks with any Linux distribution that can run bash scripts.
  • Multiple actionsThis page belongs to a category, containing some changes with similar goal.
  • Linux onlyThis script improves your privacy on Linux
  • Impact: MinimumSystem Functionality Loss Risk: Low
    This action improves privacy with minimal impact when you run the recommended script.
  • Bash (Shell script)These changes use Linux system commands to update your settings.
  • 3 scripts
  • Fully reversible

    You can fully restore this action (revert back to the original behavior) using this website.

    The restore/revert methods provided here can help you fix issues.

Overview

Web browsers, including Firefox, save various data types such as cookies, cache, and site-specific details. While this data helps in providing a faster and personalized browsing experience, it can be exploited by websites to track your activities across the internet, potentially compromising your privacy.

State partitioning, also known as "Total Cookie Protection" 1, is a feature designed to enhance user privacy in Firefox. It works by allocating different, isolated storage spaces for every website you visit 2. This means that each website has its own "compartment" where it saves its data, separate from other sites 2. This structure limits websites' capabilities to track users across various domains.

The underlying technology for state partitioning in Firefox is termed "double-keying" 1. In this method, when a website intends to store data, Firefox attaches an extra identifier tied to the site's origin, ensuring unique data storage for each site 1. For example, if two different sites incorporate content from the same third-party source, each of these sites will have its own unique version of the third-party's data (like cookies) due to state partitioning 1. This impedes the third-party's tracking ability between the sites.

This protection isn't just against known trackers 1. Firefox applies state partitioning to all third-party content on a site, ensuring a comprehensive privacy coverage, beyond just identifiable tracking sources 1 3.

A notable misuse by some trackers is the creation of "supercookies" 4. Contrary to standard cookies, which users can delete easily, supercookies are harder to eliminate and block, posing a considerable privacy challenge. Through state partitioning, Firefox renders supercookies ineffective for tracking users across sites 4. As a part of this feature, Firefox not only ensures site-specific data but also partitions multiple caches, such as HTTP cache, image cache, and favicon cache 4. This partitioning prevents any potential cache exploitation for tracking purposes 4.

In summary, enabling state partitioning in Firefox is a powerful privacy tool, helping to defend users from potential online tracking and offering a more private browsing experience.

Safe for General Use
This script has Normal protection level option. This is recommended for all users to improve without any noticeable impact on the system functionality.
Sources
PrivacyLearn.com maintains strict sourcing standards for accuracy, integrity and up-to-date content. Our content relies on authoritative sources including vendor documentation, industry standards, and verified research. Learn more about our verification process and quality standards in our editorial standards page.

Apply Now

Choose one of two ways to apply:

Download script

Download and run the script directly
  • No app needed
  • Offline usage
  • Free
  • Open-source

NormalFunctional Privacy

  • Recommended for all
  • Safe for daily use
  • No impact on system stability

Read more about Normal and other protection levels

Apply with privacy.sexy

Guided, automated application with safety checks
  • Recommended for most users
  • Includes safety checks
  • Shows the code
  • Free
  • Open-source
  • Popular
  • Offline/Online usage
Open privacy.sexy

Explore This Guide

  • 3 Privacy settings

Choose what to protect based on your needs:This script already includes these options.
You can review, apply or reverse each option individually.
Click any option to learn more about what it does.

  • Some settings and commands may require technical knowledge to apply correctly.
  • Most users find the Normal protection above sufficient.

Similar Guides

Wider Goal

Guides below includes this guide to achieve a wider goal.See other more general settings that includes this one as one of its actions.
These plans combine multiple privacy settings, including this one, for stronger protection.
The following are privacy-focused tweaks to prevent browser fingerprinting and tracking. See also: What is browser fingerprinting? | AmIUnique.org

Harden Firefox privacy

Same Goal

Other guides in Harden Firefox privacy See settings that are in the same category as this guide.
Using other actions in the same category may help you achieve your goal better.

About the Creators

These people have authored this documentation and written its scripts:

  • Avatar of undergroundwires. The creator of PrivacyLearn and privacy.sexy. Black and white portrait showing a person wearing a polka dot tie and suit jacket, reflecting the professional expertise behind the privacy protection tools.
    • Certified security professional
    • 7+ years experience securing banks
    • Open-source developer since 2005
    • EU advisor, Public Speaker, Moderator
    • Hundreds across the globe
    • Testers, reviewers, developers
    • Companies, military agencies
    • Community since 2017

Reviewed By

This guide has undergone comprehensive auditing and peer review:
  • Expert review by undergroundwires

    • Verified technical accuracy and editorial standards
    • Assessed system impact and user privacy risks
    • Audited and verified using automated security tests
  • Public review by large community

    • Privacy enthusiasts and professionals peer-reviewed
    • Millions of end-users tested across different environments
    • Audited and verified using third-party security software

History

We continually monitor our guides, their impact and other potential privacy options. We update our guides when new information becomes available. On every update, we publicly store who made the change, what has been changed, why the change was made and when the change was made.