Firefox Browser Add-ons
  • Extensions
  • Themes
    • for Firefox
    • Dictionaries & Language Packs
    • Other Browser Sites
    • Add-ons for Android
Log in
Preview of Auto-Clear Site Data

Auto-Clear Site Data by byuserforuser

Finally!!! successor to `Cookie AutoDelete` extension |🧹 Automatically clears site data (cookies, local storage, IndexedDB, Cache, SW) when you close a site's last tab, with full support for Firefox Containers 📦 and Firefox for Android 📱.

Available on Firefox for Android™Available on Firefox for Android™
4.5 (2 reviews)4.5 (2 reviews)
4 Users4 Users
Download Firefox and get the extension
Download file

Extension Metadata

Screenshots
PopupPopupSettings page
About this extension
Automatically clears website data (cookies, localStorage, indexedDB, cache, service workers, etc.) when you leave a website — whether by closing tabs, navigating away, or discarding tabs — helping you maintain privacy and free up storage. 🧹✨

🎯 Key Features:

⏱️ Smart Clearing System:
  • 🤖 Automatically clears data after configurable delay (0-3600 seconds) when you exit a site (tab close, tab discard, or navigation)
  • ⚡ Supports immediate clearing (0 seconds) for instant privacy
  • 🚀 Optional "Clear on Startup" for sites from previous session
  • 🎮 Manual "Clear Now" with granular control over data types

🛡️ Advanced Privacy Controls:
  • 🎚️ Whitelist/Blacklist Modes: Choose to clear everything except specific sites, or only specific sites
  • 📊 Granular Data Type Control: Select exactly which data to clear (cookies, localStorage, sessionStorage, indexedDB, cache, service workers, etc.)
  • 🔍 Deep Clear: Optionally clear parent domain data
  • 🔀 Redirect Catching: Clear data from sites you navigated through quickly (2-step navigation detection)

🗂️ Firefox Container Support:
  • 📦 Full support for Firefox Multi-Account Containers
  • 🎯 Per-container exemption rules
  • 🔐 Container-specific data clearing

🧠 Smart Dependencies Tracking:
  • 🕸️ Automatically tracks and clears sub-frames (iframes) and 3rd-party scripts
  • ⏳ Deferred clearing for shared resources across tabs
  • 🛑 Prevents clearing data still in use by other tabs

🔧 Developer-Friendly:
  • 🔴 Real-time badge showing pending clears
  • 📝 Optional console logging
  • 🪵 In-page logger for debugging

🚪 Trigger Events (When Data Gets Cleared):

The extension intelligently clears data when you leave a site through:
  • ❌ Tab Close - Closing the last tab of a website
  • 💤 Tab Discard - Browser automatically unloads inactive tabs
  • 🔀 Navigation - Leaving a site by navigating to a different domain
  • 🚀 Browser Startup - Optional cleanup of sites from previous session

🏗️ Technical Highlights:

This extension tackles several complex browser engineering challenges:

⚙️ Race Condition Elimination:
  • 🔒 Advanced locking mechanisms to prevent data corruption during concurrent tab operations
  • 🎯 Sharded domain index architecture to isolate container operations
  • 🔄 Multi-layered "Race Catch" logic to detect tabs opening during async operations

🚀 Performance Optimization:
  • 📈 Batched API calls reduce browser overhead by 95%
  • 💾 Smart caching with Map/Set data structures for O(1) lookups (100-400x faster than arrays)
  • 🎨 Debounced I/O operations reduce storage writes by 80%
  • ⚡ Lazy loading for UI rendering with 1000+ rules

🧩 Advanced Architecture:
  • 🗃️ Persistent dependency tree survives browser crashes
  • 🌐 Public Suffix List (PSL) integration for accurate domain parsing
  • 🔄 Two-tier exemption cache with compiled regex patterns
  • 📊 Session persistence with comprehensive state tracking

🎭 Edge Case Handling:
  • 🌏 IPv6 support
  • 🔁 Meta-refresh and client-side redirect detection
  • 👻 "Ghost page" dependency tracking
  • 🔀 Cross-container global data management

📱 Cross-Platform:
  • 🦊 Firefox Desktop
  • 📱 Firefox Android

🎯 Perfect For:
  • 🕵️ Privacy-conscious users who want automatic cleanup
  • 🎨 Multi-container power users managing multiple identities
  • 💾 Anyone wanting to free up browser storage automatically
  • 👨‍💻 Developers testing different login states and browser scenarios

📊 Performance Metrics:

The extension has been heavily optimized through multiple iterations:
  • ⚡ Startup time: 65% faster (200-800ms vs 600-2200ms)
  • 🚀 Lookup operations: 100-400x faster with Map/Set
  • 💾 Storage I/O: 80% reduction via debouncing
  • 🔒 Race conditions: 100% eliminated with granular locking

Privacy First

All processing is done 100% locally on your device. Your settings, exemption lists, and browsing habits are never transmitted, shared, or analyzed.
Rated 4.5 by 2 reviewers
Log in to rate this extension
There are no ratings yet

Star rating saved

5
1
4
1
3
0
2
0
1
0
Read all 2 reviews
Permissions and data

Required permissions:

  • Clear recent browsing history, cookies, and related data
  • Access browser tabs
  • Access browser activity during navigation

Optional permissions:

  • Access your data for all websites

Data collection:

  • The developer says this extension doesn't require data collection.
Learn more
More information
Version
3.4.2
Size
108.35 KB
Last updated
4 hours ago (Nov 22, 2025)
Related Categories
  • Privacy & Security
License
All Rights Reserved
Privacy Policy
Read the privacy policy for this add-on
Version History
  • See all versions
Tags
  • anti tracker
  • container
  • privacy
  • security
Add to collection
Report this add-on
Go to Mozilla's homepage

Add-ons

  • About
  • Firefox Add-ons Blog
  • Extension Workshop
  • Developer Hub
  • Developer Policies
  • Community Blog
  • Forum
  • Report a bug
  • Review Guide

Browsers

  • Desktop
  • Mobile
  • Enterprise

Products

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Privacy
  • Cookies
  • Legal

Except where otherwise noted, content on this site is licensed under the Creative Commons Attribution Share-Alike License v3.0 or any later version. Android is a trademark of Google LLC.