How to auto-delete cookies on tab close in Chrome
TL;DR: Chrome cannot auto-delete cookies per tab — only per browser exit. To get per-tab cleanup, install a Manifest V3 extension like CookieVault Guardian, add the sites you trust to the whitelist, and Guardian handles the rest: cookies, localStorage, IndexedDB, and Cache Storage are cleaned the moment the last tab on a domain closes.
Auto-deleting cookies on tab close is the practice of removing all browser storage for a domain the moment its last tab closes, while the browser continues running and other tabs remain unaffected. Chrome’s built-in “Delete cookies and site data when you close all windows” setting only works on full browser exit — not per-tab. For per-tab cleanup you need a Manifest V3 extension.
Why per-tab cleanup matters
In short: Every non-whitelisted site you visit deposits cookies, localStorage, and IndexedDB entries that survive across sessions and can be used for tracking. Manually clearing them is tedious; “clear on browser exit” doesn’t help because most people don’t close their browser for days. Per-tab cleanup is the surgical middle ground.
Three reasons per-tab auto-delete is the right privacy posture for most users:
- Most people never close their browser. “Clear on exit” requires actually exiting Chrome. Most users keep it open across sleep cycles, so cookies accumulate indefinitely.
- Manual clearing is all-or-nothing. Chrome’s bulk delete wipes everything or per-site — there is no “delete everything except my whitelisted sites” built-in.
- Modern tracking uses more than cookies. localStorage, IndexedDB, and Cache Storage can all hold tracking identifiers that survive cookie deletion. An extension that only cleans cookies misses half the modern tracking surface.
Chrome’s built-in options (and their limits)
In short: Chrome offers “Clear on exit” and manual per-site deletion, but neither gives you automatic per-tab cleanup. The comparison table below shows why an extension is the only path to that workflow.
| Feature | Chrome built-in “Clear on exit” | Chrome manual per-site | CookieVault Guardian |
|---|---|---|---|
| Triggers on | Browser exit only | Manual action | Tab close |
| Granularity | All sites | One site at a time | Per domain, automatic |
| Whitelist | No | No | Yes (with wildcards) |
| Cleans localStorage | Yes (on exit) | Yes (per site) | Yes (on tab close) |
| Cleans IndexedDB | Yes (on exit) | Yes (per site) | Yes (on tab close) |
| Requires user action | Close browser | Navigate to settings | Nothing (after setup) |
Setup: eight steps to working per-tab cleanup
- Install CookieVault Guardian from the Chrome Web Store (or Edge Add-ons / Firefox Add-ons / GitHub CRX).
- Pin the toolbar icon so the shield is visible for one-click whitelist access.
- Visit sites you want to keep logged in — email, bank, work tools, password manager.
- Click the Guardian icon → “Add to whitelist” on each. Subdomain inheritance is on by default.
- Verify the whitelist in Settings → Whitelist tab.
- Browse normally and close a non-whitelisted tab. Guardian auto-cleans.
- Reopen the site to verify — you should be logged out, localStorage gone.
- Tune cleanup targets (optional) — toggle individual storage types if a site breaks.
Starter whitelist recommendation
A five-domain starter list that covers most users’ critical logins:
- Your primary email (Gmail / Outlook / Proton)
- Your code host (GitHub / GitLab)
- Your work tools (Linear, Notion, Slack, Figma)
- Your bank
- Your password manager’s web UI (1Password / Bitwarden)
Everything else cleans on tab close by default. Add more as you discover sites that break.
See also
- CookieVault Guardian — product overview and browser support matrix
- Cookie whitelist guide — how to configure the whitelist in detail
- Cookie AutoDelete alternative — migration from Cookie AutoDelete
- Clear cookies but stay logged in — selective deletion without auto-cleanup
- How to delete cookies in Chrome — manual deletion methods
- What is a cookie? — the underlying protocol