How to Clear History Automatically When You Close Your Browser
Written by Jem Jack · Published September 4, 2026
The most reliable privacy habit is the one you never have to think about. Setting your browser to clear history on exit means your browsing data wipes itself the moment you close the window — no menus, no remembering, no trail left behind. Here’s how to set it up in each browser, what it does and doesn’t cover, and how to get a complete clean-up.
Why “on exit” beats clearing by hand
Clearing manually only works if you remember to do it, and most people don’t. When it runs automatically on close, the browser does it for you every single session. It’s ideal for shared computers, work laptops, or anyone who just wants a consistently clean slate.
Clear cookies on exit in Chrome
Chrome has a built-in option, though it’s limited to site data. Go to Settings → Privacy and security → Site settings → Additional content settings → On-device site data and choose Delete data sites have saved to your device when you close all windows (older versions of Chrome put it under Third-party cookies). Note what this covers: cookies and site data only — not your history. We tested it: after closing and reopening Chrome we were signed out of our email and the shopping cart was empty, but all six pages were still in the history, with the same times.

Clear on exit in Edge and Firefox
In Edge, go to Settings → Privacy, search, and services → Clear browsing data → Choose what to clear every time you close the browser — Edge actually lets you pick history, cache and cookies. In Firefox, open Settings → Privacy & Security → History → Use custom settings and tick Clear history when Firefox closes.
What each browser clears on close
| Browser | Clears on exit |
|---|---|
| Chrome (built-in) | Cookies & site data only |
| Edge (built-in) | History, cache, cookies — your choice |
| Firefox (built-in) | History, cookies, cache — your choice |
The gap in Chrome — and how to fill it
Chrome’s native option is handy but only covers cookies and site data, leaving your history behind. To close that gap you need an administrator policy or an extension. Reasons people go beyond the built-in setting:
- They want history gone on close, not just cookies.
- They want the cache and downloads list cleared too.
- They want the same behaviour across every browser they use.

The admin policy that really clears history on exit
Chrome has one way to delete history as it closes: the ClearBrowsingDataOnExitList policy, made for schools, libraries and offices. On Windows you add it in the registry under HKEY_CURRENT_USER\Software\Policies\Google\Chrome\ClearBrowsingDataOnExitList as text values named 1, 2, 3 and so on, one per data type, for example browsing_history, download_history, cookies_and_other_site_data and cached_images_and_files. Google’s documentation says it only works when sync is turned off with the SyncDisabled policy. In our test the history was empty after a restart. The side effects: Chrome says it is managed by your organization, sync stays off, and you can’t switch the policy off from Chrome’s settings. Delete the keys and restart Chrome to undo it.
Clear history on exit with Auto History Wipe
Auto History Wipe adds what Chrome’s own setting lacks: its Clean When the Last Window Closes option clears the data you’ve chosen, including history, as soon as you close the last window. An extension can’t finish a clean once the whole browser has shut down, so while this option is on, Chrome keeps running in the background after the last window closes and starts when you sign in to Windows. You can quit it from its system tray icon, or switch the option off in Settings. If you quit Chrome completely with a window open, the clean runs the next time it starts. You can also clean every time Chrome starts, on a schedule or with one click, and keep the sites you choose signed in. For the full walkthrough, see how to delete browsing history automatically.
Clear history on exit across all your devices
If you switch between a desktop, a laptop and a phone, remember that the “on close” setting lives in each browser separately — turning it on in one place doesn’t sync to the others. Set it up wherever you browse, and pick the same items each time so your behaviour stays consistent: history and cache everywhere, cookies where you’re happy to sign out. On a work or family machine this is especially worthwhile, because it guarantees nothing is left behind for the next person who sits down. Spend two minutes per device once, and every session on every device starts and ends clean — without a single manual step from then on.
Frequently asked questions
Can Chrome clear history on exit, not just cookies?
Not with a normal setting — Chrome’s built-in “on close” option only clears cookies and site data. The ClearBrowsingDataOnExitList admin policy does clear history on exit, with the side effects above. Otherwise, use an extension like Auto History Wipe: with its exit option on, Chrome keeps running in the background so the clean can happen when the last window closes, and it starts when you sign in to Windows. If Chrome is quit completely with a window open, the clean runs at the next start.
Will clear-on-exit sign me out of my sites?
If it clears cookies, yes — you’ll start each session signed out. Many people prefer that on a shared device; if not, clear history and cache but leave cookies.
Does clearing on exit slow down my browser?
No. The clean-up runs as you close the window, so you never notice it. The next session simply starts fresh.
Set this up once, and privacy stops being a chore — every time you close the window, the slate is wiped clean by itself.