Firefox Browser Add-ons
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 📱.

3.7 (7 reviews)3.7 (7 reviews)
44 Users44 Users
Download Firefox
Download file

Extension Metadata

Screenshots
PopupPopupSettings page
About this extension
Auto-Clear Site Data

Automatically clears cookies, localStorage, indexedDB, cache, and service workers when you leave a site — whether you close a tab, navigate away, or the browser discards it. Stay private and keep your storage clean without lifting a finger. 🧹



✨ What It Does
  • Auto-clears on exit — Data is wiped after a configurable delay (0–3600s) when you leave a site
  • Clear on Startup — Optionally clean up leftover data from your last session
  • Total Cookie Protection Ready — Completely clears cross-site partitioned cookies introduced by Firefox's Strict Enhanced Tracking Protection, leaving zero traces behind (only cookie)
  • Manual "Clear Now" — One-click clearing with full control over what gets removed

🎛️ Flexible Exemptions

Create independent exemption rules for any site or pattern:
  • Whitelist mode — Clear everything except your exempted sites
  • Blacklist mode — Only clear data from sites you specify
  • Per-container rules — Different exemptions for each Firefox Container
  • Granular control — Choose exactly which data types to keep or clear per rule

🔍 Advanced Options
  • Deep Clear — Also clear parent domain data (e.g., accounts.google.com → google.com)
  • Redirect catching — Catch and clear sites you quickly pass through
  • Deferred clearing — 3rd-party resources shared across tabs are cleared only when all tabs using them are closed
  • Smart dependency tracking — Automatically tracks iframes and scripts, never clears data still in use
  • Container support — Full Firefox Multi-Account Containers integration with per-container settings

🚀 When Data Gets Cleared
  • ❌ Tab closed — Last tab of a site is closed
  • 💤 Tab discarded — Browser unloads inactive tabs
  • 🔀 Navigation — You navigate to a different domain
  • 🚀 Startup — Optional cleanup from previous session

⚡ Built for Performance
  • Batched API calls reduce browser overhead
  • Smart dependency tracking prevents clearing data still in use
  • Race-condition-safe architecture

🔒 Privacy First

100% local. Your settings and browsing habits never leave your device.



🔐 Permissions Explained
  • tabs — Check if a site is still open before clearing its data
  • browsingData — Actually clear cookies, cache, localStorage, etc.
  • storage — Save your settings and exemption rules
  • contextualIdentities — Support Firefox Containers
  • webNavigation — Detect when you navigate away from a site
  • cookies — Find all cookie names for browser.cookies.remove() api to remove partition cookies
  • webRequest — Track iframes and 3rd-party scripts loaded by pages
  • alarms — Schedule delayed clearing



Works on Firefox Desktop and Firefox Android.



⚠️ Known Limitations & Firefox Behaviors

1. Total Cookie Protection (TCP) & Partitioned Data

If you use Firefox with Total Cookie Protection enabled (Strict Enhanced Tracking Protection, or network.cookie.cookieBehavior = 5), Firefox isolates site data into specific partitions to prevent cross-site tracking.
  • Cookies (Fixed): Partitioned cross-site cookies are fully supported and will be safely extracted and eradicated by this extension.
  • LocalStorage, IndexedDB and others: Currently, the Firefox WebExtensions API lacks full support for selectively clearing partitioned data (like LocalStorage and IndexedDB) by hostname. As a result, cross-site partitioned folders for these types might not be completely cleared.
  • Workaround (Not recommended): If you rely heavily on this extension to clear all cross-site storage, you can adjust your Enhanced Tracking Protection settings to Custom and select Cross-site and social media trackers (network.cookie.cookieBehavior = 4).

2. Leftover .metadata-v2 Files

After the extension clears a site's data, you might notice that an empty directory containing a .metadata-v2 file remains (e.g., in /storage/default/).
  • Privacy Safe: Please rest assured that the actual data payload is completely safely cleared. The .metadata-v2 file is strictly an internal bookkeeping file managed by Firefox's QuotaManager. Websites have zero access to this file, meaning it cannot be used for tracking or as a supercookie.
  • Why it's not deleted: Due to security sandboxing, WebExtensions do not have the filesystem permissions required to delete Firefox's internal root folders or metadata files.
Rated 3.7 by 7 reviewers
Sign in to rate this extension
There are no ratings yet

Star rating saved

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

Required permissions:

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

Optional permissions:

  • Display notifications to you
  • Access your data for all websites

Data collection:

  • The developer says this extension doesn't require data collection.
Learn more
More information
Version
3.13.2
Size
119.99 KB
Last updated
6 days ago (Feb 25, 2026)
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.