How to Automatically Clear Browsing Data Every Time You Close Microsoft Edge

Modern web browsing accumulates extensive digital footprints over time, including tracking cookies, cached images, download histories, form autofill records, and visited URLs. While cached assets help frequently visited webpages load slightly faster, accumulated temporary files consume disk space, preserve stale login states, and allow advertising trackers to follow your browsing habits across different websites.

Rather than remembering to clear your browsing history and temporary files manually through the Settings menu, Microsoft Edge includes an automated privacy feature: Clear browsing data on close. This built-in utility lets you select precisely which categories of data Edge purges automatically every time you shut down all browser windows. In this guide, we explore how to configure automatic data clearing in Microsoft Edge and preserve essential login cookies for trusted websites.

Why Automate Browsing Data Cleanup?

Automating your browsing cleanup routine provides substantial security and maintenance advantages:

  • Enhanced Privacy on Shared Computers: Ensures that family members, colleagues, or guests using your workstation cannot review your recent web history or access active website accounts.
  • Reduced Disk Clutter: Prevents multi-gigabyte browser caches from silently taking over local solid-state storage.
  • Tracker Elimination: Automatically purges persistent third-party tracking cookies each time your browsing session concludes.
  • Granular Flexibility: Unlike browsing permanently in InPrivate mode, you can choose to delete history and cache while selectively retaining site logins and saved passwords.

How to Clear Browsing Data on Close in Microsoft Edge

To configure Microsoft Edge to purge data automatically whenever the browser exits:

  1. Launch Microsoft Edge on your Windows or Mac computer.
  2. Click the three-dots menu icon (…) located in the top-right corner of the browser window.
  3. Select Settings from the flyout menu.
  4. In the left-hand navigation pane, click Privacy, search, and services.
  5. Scroll down to the Clear browsing data section.
  6. Click on Choose what to clear every time you close the browser.
  7. You will see a list of toggles representing different categories of browsing data:
    • Browsing history: Deletes the list of websites and webpages you visited during your session.
    • Download history: Clears the list of downloaded files (the downloaded files themselves remain safely on your computer).
    • Cookies and other site data: Signs you out of websites and clears tracking tokens.
    • Cached images and files: Clears temporary media files downloaded to render webpages quickly.
    • Passwords: Deletes saved credentials (leave this disabled if you rely on Edge’s built-in password manager).
    • Autofill form data: Clears addresses, email entries, and phone numbers typed into web forms.
    • Site permissions: Resets camera, microphone, and location permissions granted to websites.
  8. Toggle on the specific categories of data you wish to delete automatically upon exit.

The changes take effect immediately. As soon as all open Microsoft Edge windows and background processes terminate, Edge executes a silent cleanup routine.

How to Keep Cookies for Specific Websites While Clearing the Rest

One common annoyance with clearing cookies automatically upon exit is being forced to log into your most important accounts—such as corporate email, GitHub, or online banking—every single day. Microsoft Edge solves this problem by allowing you to add website exceptions:

  1. On the Choose what to clear every time you close the browser settings page, toggle on Cookies and other site data.
  2. A new option titled Don’t clear cookies for these sites will appear immediately below.
  3. Click the Add button.
  4. Enter the URL of the website you wish to keep logged in (for example, [*.]microsoft.com or [*.]google.com to encompass all subdomains).
  5. Check the box for Include third-party cookies on this site if required by authentication portals, then click Add.

Microsoft Edge will now wipe out tracking tokens and advertising cookies across the broader web upon closing, while securely preserving session cookies for your trusted whitelisted domains.

Ensuring Microsoft Edge Background Processes Close Completely

For automatic clearing to take place, Microsoft Edge must fully terminate. By default, Edge includes features like Startup boost and Continue running background extensions and apps when Microsoft Edge is closed that can keep a background service active in Windows Task Manager.

If you find that data is not clearing when you close browser windows, follow these steps:

  1. In Edge Settings, click System and performance in the left sidebar.
  2. Under the System section, toggle off Startup boost.
  3. Toggle off Continue running background extensions and apps when Microsoft Edge is closed.

With these two options disabled, clicking the red close button (X) cleanly shuts down all Edge binaries immediately, triggering your automated data-clearing rules every time.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.