How Firefox Identifies and Purges Bounce Trackers
This article explores how Mozilla Firefox's Bounce Tracking Protection mechanism detects and eliminates covert redirect trackers. By examining the heuristics Firefox uses to monitor navigation chains, user interactions, and data storage access, you will learn how the browser differentiates between legitimate websites and intermediate tracking domains. Finally, the article details the automated purging process that wipes tracker data to preserve user privacy.
What is Bounce Tracking?
As browsers phased out third-party cookies, advertising networks adopted bounce tracking to bypass privacy protections. When you click a link, a bounce tracker briefly routes your browser through an intermediate domain before sending you to your final destination. Because you technically visit this intermediate domain directly, the browser treats it as a first-party site. This allows the tracker to set first-party cookies or access local storage in milliseconds, effectively tracking your movement across the web without your knowledge.
How Firefox Identifies Bounce Trackers
Instead of relying solely on static blocklists, which trackers can easily evade by changing domain names, Firefox uses behavioral heuristics to identify bounce trackers in real time. The browser monitors navigation events and evaluates intermediate sites based on four specific criteria:
1. Navigation Chain Monitoring
Firefox tracks the entire lifecycle of a navigation event, known as an extended navigation. When a user clicks a link, Firefox records the starting domain, every intermediate domain passed through via HTTP redirects or rapid JavaScript redirects, and the final destination domain.
2. Storage Write Detection
Not all redirects are malicious; many are used for legitimate URL
shortening or routing. Firefox specifically watches to see if an
intermediate domain attempts to write data to the browser. If a site in
the middle of a redirect chain sets a cookie, modifies
localStorage, or writes to IndexedDB, Firefox
flags the domain as a suspect.
3. Lack of User Interaction
A defining characteristic of a bounce tracker is that the redirect happens automatically. Firefox measures whether the user interacted with the intermediate page (such as clicking a button, scrolling, or typing). If the site redirects the user before any meaningful interaction occurs—typically within a matter of milliseconds or a few seconds—it meets the criteria of a bounce.
4. Historical Interaction Check
Legitimate services, such as Single Sign-On (SSO) providers and payment gateways, also use redirects and store cookies. To avoid breaking these services, Firefox maintains an internal record of sites the user has meaningfully interacted with over the past 45 days. If a domain is flagged during a redirect, Firefox checks this database. If the user has previously interacted with the domain as a primary destination within that 45-day window, the domain is exempt from being classified as a tracker.
How Firefox Purges Tracker Data
Once an intermediate domain satisfies all the criteria of a bounce tracker—it redirected automatically, wrote to storage, and has no history of user interaction—Firefox initiates the purging process to neutralize the tracking attempt.
The Grace Period
Firefox does not delete the data the exact millisecond the redirect finishes. Instead, the flagged domain is placed on a "pending purge" list and given a short grace period. This prevents the browser from accidentally breaking slow-loading authentication flows or complex multi-step redirects that the user is actively waiting to complete.
Periodic Execution
Firefox runs a background timer at regular intervals to process the pending purge list. When the timer triggers, the browser checks if the grace period for each flagged domain has expired and confirms the user does not currently have that domain open in an active tab.
Complete State Wipe
If the conditions are met, Firefox executes a complete storage clear for the identified bounce tracker. This purge deletes:
- All first-party and third-party cookies.
- LocalStorage and SessionStorage data.
- IndexedDB databases.
- Service Workers and Cache API data.
- Network cache associated with the domain.
By wiping the entirety of the domain's stored state shortly after the redirect occurs, Firefox ensures that the next time you are bounced through that same tracking domain, it will treat you as a brand-new user, effectively breaking the tracking profile.