How Cookie Jar Overflow Caps Tracker Storage
Every browser enforces a finite budget on how many cookies a single origin can store and how large those cookies can be. When a tracker attempts to write a new cookie that would push storage past that budget, the browser does not silently expand the jar — it evicts older entries to make room, following rules baked into the browser engine itself. That eviction behavior is the mechanism this article examines.
Cookie-based tracking depends on persistent identifiers written to and read from that storage. The jar overflow condition is not an edge case; it is a structural constraint that shapes how third-party trackers manage their data and why some identifier values disappear in ways that neither the user nor the site operator directly controls.
Securely manage keys for 60+ AI providers in one encrypted vault instead of juggling them across apps.
How the Browser Enforces Cookie Jar Limits and Triggers Eviction
The HTTP cookie specification, formalized in RFC 6265, sets minimum storage requirements that conforming browsers must support: at least 50 cookies per domain, at least 4,096 bytes per cookie, and at least 3,000 cookies in total across all domains. Browser engines treat these as floors, not ceilings, and most implement higher limits in practice. However, every implementation retains an upper bound, and that bound is enforced at write time.
When a Set-Cookie response header arrives and the receiving origin already holds cookies equal to the per-domain cap, the browser engine evaluates the existing set against an eviction algorithm. The most widely implemented algorithm is Least Recently Used (LRU): the cookie whose access timestamp is oldest is removed first to free a slot for the incoming value. Some engines also apply a secondary sort by creation time when access timestamps are equal.
The eviction happens atomically from the perspective of the requesting script. The new cookie is written; the displaced cookie is gone. No error is surfaced to JavaScript. A tracker reading document.cookie immediately after a write will see the new value but will not receive any signal that a prior value was dropped. This silent displacement is the core behavior that produces unexpected tracking gaps.
For third-party cookie tracking, the domain that owns the cookies is the tracker's own origin, not the site the user is visiting. That means the per-domain cap applies to all cookies the tracker has written across every page where its scripts have executed. A tracker that embeds on thousands of sites and writes a unique identifier per session can exhaust its per-domain allotment quickly, triggering LRU eviction of identifiers associated with earlier sessions.
The total-jar cap operates separately. When the browser's global cookie count reaches its ceiling, the engine evicts cookies from whichever origin holds the least recently accessed entries, regardless of which site the user is currently on. A tracker with a large footprint across many origins is statistically more likely to have its cookies aged out by global eviction than a first-party cookie written by the site being visited.
The Components Involved: Browser Engine, Cookie Store, and Tracker Script
The browser engine's cookie store is a structured database maintained in the user profile directory. It records each cookie's name, value, domain, path, expiry, creation time, last-access time, and flag attributes (HttpOnly, Secure, SameSite). The last-access timestamp is updated every time a matching cookie is sent in an outbound request or read via document.cookie. This timestamp is the direct input to the LRU eviction algorithm.
The HTTP layer is the channel through which cookies travel. A Set-Cookie response header instructs the browser to write or overwrite a named value. A Cookie request header carries matching values back to the server on subsequent requests. The browser, not the server, decides whether the write succeeds and whether an eviction is required. The server receives no acknowledgment of eviction.
Tracker scripts are JavaScript payloads loaded from a third-party origin. Understanding how a first-party cookie stores session state clarifies the contrast: first-party cookies are scoped to the visited domain and are read frequently during a session, which refreshes their access timestamps and insulates them from LRU eviction. Tracker scripts operating as third parties write cookies under their own domain and may not access those cookies again until the user visits another page embedding the same tracker — potentially a long interval that ages the cookie toward eviction eligibility.
The SameSite and Secure attributes affect which cookies the browser will transmit in cross-site contexts, but they do not alter the eviction accounting. A cookie flagged SameSite=None; Secure — the configuration required for a third-party cookie to be sent in cross-site requests — occupies the same slot in the per-domain count as any other cookie and is subject to identical eviction rules. The attributes govern transmission scope, not storage priority.
Storage partitioning, implemented in several browser engines as a response to cross-site tracking, adds a further constraint. Under partitioned storage, a third-party cookie written in the context of Site A is stored in a partition keyed to Site A, separate from the same tracker's cookies written in the context of Site B. Each partition counts toward the per-domain cap independently, which can cause the cap to be reached faster across a tracker's footprint and increase the frequency of eviction events.
Where Jar Overflow Produces Results That Trackers and Sites Do Not Expect
The most common unexpected result is silent identity fragmentation. A tracker that relies on a long-lived persistent identifier — the kind examined in detail when looking at how a tracker cookie survives a browser restart — can lose that identifier to LRU eviction without any error being logged. The tracker's server receives a request with no matching cookie, interprets the user as new, and issues a fresh identifier. The historical record associated with the old identifier becomes orphaned. From the tracker's perspective, the user profile has been split.
This fragmentation is not equivalent to privacy protection in a strict technical sense. The tracker may re-link profiles through other signals — IP address ranges, browser fingerprint components, or query string parameters carrying tracker data appended to outbound links. Cookie eviction removes one persistent signal; it does not remove all signals, and there is no assurance that re-linkage cannot occur.
A second unexpected result involves cookie consent flows. When a consent management platform sets a cookie recording the user's rejection of tracking, that consent record is itself a cookie subject to the same eviction rules. If the consent cookie is evicted before it expires, the consent management platform may re-display the consent banner on a subsequent visit, treating the user as having made no prior choice. The technical record of consent is not durable beyond the cookie's presence in the jar.
A third friction point arises with session management on sites that set many cookies. A site that writes a large number of per-feature cookies — A/B test assignments, localization preferences, authentication tokens — may inadvertently push its own older cookies past the per-domain cap during a single session. The evicted cookie is typically the one set earliest in the session, which may be a token the site's server-side logic still expects to be present. The server receives a request without the expected token and may respond with an error or a redirect to a login page, even though the user has not cleared cookies manually.
Finally, the global jar cap interacts poorly with automated testing environments and headless browsers that accumulate cookies across many synthetic sessions without periodic clearing. In those environments, global eviction can remove cookies from domains unrelated to the domain under test, producing false negatives in cookie-dependent test assertions.
What Audits and Standards Actually Capture About Cookie Jar Limits
RFC 6265bis, the updated cookie specification maintained by the IETF, documents the minimum storage requirements and the recommendation that browsers implement LRU eviction. It does not mandate a specific per-domain ceiling above the minimum, and it does not require browsers to expose eviction events to scripts or server logs. An audit of a browser's cookie handling against the specification can confirm that the browser meets the minimum thresholds and implements LRU, but it cannot confirm what the actual upper limit is, because the specification leaves that to the implementer.
The FTC's guidance on online tracking focuses on notice, choice, and the downstream use of collected data rather than on the technical storage mechanics of the cookie jar. An audit conducted against FTC guidance would examine whether a tracker discloses its data practices, whether a consent mechanism is presented, and whether data is shared with third parties — not whether the tracker's cookies are vulnerable to LRU eviction. The eviction behavior sits below the layer that regulatory audits typically inspect.
Browser privacy audits conducted by independent researchers typically measure which cookies are set, their attribute configurations, and whether they are classified as tracking cookies by known block lists. These audits record the presence or absence of cookies at a point in time. They do not record eviction events, because eviction leaves no artifact in the cookie store — the evicted entry is simply absent. An audit that finds fewer tracker cookies than expected cannot distinguish between cookies that were never set, cookies that were blocked by browser policy, and cookies that were evicted by the jar overflow mechanism.
Storage partitioning implementations have been documented in browser release notes and in the Privacy CG specification work, but compliance with partitioning behavior is not yet subject to a standardized audit framework. A site or tracker cannot be tested against a pass/fail criterion for partitioned cookie handling in the same way that TLS configuration can be tested against a cipher suite standard. The record of what partitioning achieves — and what it does not — remains largely in browser vendor documentation rather than in auditable standards.
Post-cookie tracking methods, which operate outside the cookie store entirely, are not affected by jar overflow mechanics at all. Technologies that use browser fingerprinting, link decoration, or server-side identity graphs do not write to the cookie jar and therefore cannot be evicted from it. An absence of tracker cookies in an audit does not indicate an absence of tracking; it indicates only that cookie-based storage was not used or was not retained at the time of measurement.
The cookie jar overflow condition is a structural feature of the browser storage model, not a configurable privacy setting. Its effects — silent eviction, identity fragmentation, and the re-display of consent prompts — emerge from the interaction between per-domain caps, LRU accounting, and the access-timestamp mechanics that browsers have implemented since the earliest cookie specifications. The behavior operates below the layer visible to users and below the layer that most regulatory frameworks currently audit.
Sources
Note: This explains how digital privacy and security tools work technically. It is not legal or cybersecurity advice, and it is not a substitute for a reader's own judgment about a real security concern. Check the cited sources for current guidance.