Articles / Privacy

  • firefox
  • containers
  • browser-privacy
  • cookies
  • fingerprinting
  • privacy

What Firefox Containers Isolate, and What Still Leaks Between Them

Firefox containers are often described as "separate browsers in one window", and that description is where the trouble starts. They separate a specific set of things very well. Everything else is shared, and the shared list is longer than most people assume.

So if you put your work account in one container and your shopping in another, what exactly stops the two from learning about each other? Let's go through it.

The mechanism: a number glued onto every origin

Each container is a numeric "user context ID". Firefox attaches it to the origin attributes of every page loaded in that tab. Storage is then keyed on the origin plus that attribute, so the same site in two containers gets two separate buckets.

Roughly, the internal origin looks like this:

https://example.com
https://example.com^userContextId=2

Those are different origins as far as the storage layer is concerned. That is the whole trick, and it is why it works without a second profile or a second process tree.

What is genuinely separated

The things keyed on origin attributes are isolated per container:

  • cookies
  • localStorage and sessionStorage
  • IndexedDB
  • the HTTP cache

A site in one container cannot read another container's cookies or storage, so you can be logged in as two different users on the same site at once. That is the real use case, and it holds up.

Quick detour: why a tracker cannot just reuse the cookie

Hang on, why does this beat simply clearing cookies? Because there is no moment where the state is merged. Each container's jar is queried independently, so a tracking cookie set in your "Shopping" container is never even offered to a request from "Banking".

This is separate from Firefox's Total Cookie Protection, which partitions third-party cookies per top-level site. The two stack: containers split by identity, partitioning splits by site within each one.

What is shared between every container

Here is the part that surprises people. Containers do not touch any of this:

  • Your IP address. Every container leaves through the same network connection, so two sites can match the same address.
  • Your browser fingerprint: user agent, screen size, fonts, canvas and GPU quirks are identical.
  • Browsing history and bookmarks, which live in one shared database.
  • Saved logins and autofill data.
  • Extensions, which run across all containers and can see all of them.
  • The downloads folder, the clipboard and the rest of your operating system.

An advertiser or analytics provider that fingerprints you sees one machine, not two. Cookies were only ever one way to link visits, and containers only deal with that one.

How tabs leak in practice

Most real leaks are not technical, they are you. A few common ones:

  1. You copy a URL containing a session token or tracking parameter from one container and paste it into another.
  2. You use a shared password manager entry or autofill, which hands the same email address to both.
  3. You sign in to two "separate" identities from the same IP at nearly the same times of day.
  4. An extension with broad permissions logs activity across all tabs.

Links also inherit context. A link opened in a new tab from a container normally stays in that container, so clicking through from a work page keeps you in the work identity. That is usually what you want, but it means a stray click can drag a tracked session somewhere you did not plan.

Site assignment can move you

The Multi-Account Containers extension lets you pin a site to a container. Open that site from anywhere and Firefox reloads it in the assigned container instead. Handy, but note that the original navigation request has already happened in the first context, so the site may have seen it before the redirect to the right container.

Treat assignment as a convenience for keeping tabs tidy, not as a guarantee that the wrong container never made a request.

Picking the right tool for the threat

Match the isolation to what you are defending against:

  • Stopping a site tracking you across other sites by cookie: containers, plus default partitioning, do this well.
  • Keeping two accounts on one site apart: containers are ideal.
  • Stopping linkage by IP or fingerprint: you need a VPN or Tor Browser, and even then fingerprinting is a separate fight.
  • Stopping malicious code reaching other tabs: containers are not a security sandbox, so look at separate profiles or a separate machine.

Containers are a good, cheap tool with a narrow job. Just do not mistake "different colour tab" for "different person" in the eyes of the server.