Skip to content

Firefox Not Clearing Site Data on Close Despite Setting Enabled

Firefox has a setting that wipes cookies and site data on close, but several things can keep that data around even with the box ticked. The most common cause is a site listed under Manage Exceptions with permission Allow, which Firefox intentionally skips on close.

This guide walks through every documented reason Firefox may not clear site data on close, from the inner Clear History dialog to extensions that re-create storage when the browser exits. Each step is a quick check for your current profile.

In this guide, I have covered:

Why Firefox May Keep Site Data After Closing

Firefox’s “Delete cookies and site data when Firefox is closed” option is meant to wipe cookies, local storage, and other site data every time you shut the browser. When the setting is on but data still survives a restart, the cause is almost always one of three things.

A site listed in Manage Exceptions with Allow permission is intentionally skipped on close, the inner “Clear history” dialog can override the main checkbox, and some extensions re-create the data the moment Firefox exits. The first step is to confirm the checkbox is actually checked, then work through the specific causes below.

Confirm the Setting Is Actually Enabled

The checkbox label is exact, so look for that wording in the page.

  1. Click the hamburger menu horizontal 3-bar icon at the top right of Firefox and choose Settings. On macOS, open the Firefox menu and select Settings instead.
  2. Click Privacy & Security in the left column.
  3. Scroll to the Cookies and Site Data section and check the box labeled Delete cookies and site data when Firefox is closed.

If the box is already ticked, jump to the next section. The checkbox can occasionally appear checked but be ignored if the profile is in a partially broken state, so a quick verify up front saves time later.

Check the Manage Exceptions List

Any site you have explicitly allowed under Manage Exceptions is intentionally skipped when Firefox closes, even with the main checkbox turned on. This is the single most common reason users see “the setting is on but data is still there.”

  1. Open the hamburger menu horizontal 3-bar icon and choose Settings.
  2. Click Privacy & Security in the left sidebar.
  3. Scroll to the Logins and Passwords section.
  4. Click Exceptions to see the full list of skipped sites.
  5. Search the list for the site whose password seems to be missing.
  6. Select the entry and click Remove Website to allow Firefox to save logins for it again.

If a site you want cleared appears in the Exceptions list, change its permission from Allow to Block, or remove the entry entirely. Close and reopen Firefox so the change takes effect on the next session.

Check the “Clear History” Settings Override

Firefox has a second, older dialog that can take over the clearing behavior. The Clear history when Firefox closes checkbox sits in the History section of the same Privacy & Security page. When you tick that box, a Settings… button appears next to it, opening a dialog with finer-grained checkboxes for Browsing history, Cookies, Cache, Active Logins, Form and Search History, Site preferences, and Offline Website Data.

  1. Stay on the Privacy & Security page and scroll to the History section.
  2. If Clear history when Firefox closes is checked, click the Settings… button to its right.
  3. Make sure Cookies is checked in the inner dialog, along with any other data types you want wiped.
  4. Click Save Changes.
note icon

If this inner dialog is set to clear cookies but the main “Delete cookies and site data” box is unchecked, Firefox uses this inner list instead. If both are configured but the inner list has Cookies unchecked, no site data gets cleared on close.

Test in a Private Window

A Private Window disables most stored data on close by design. If site data is also missing after a Private Window session, the clearing mechanism is working and the leftover data is coming from your regular profile. If a Private Window still leaves data behind, the issue is more fundamental.

  1. Press Ctrl + Shift + P (or Cmd + Shift + P on macOS) to open a Private Window.
  2. Visit the site that was not accepting cookies.
  3. If it works here, return to the normal window and run Troubleshoot Mode to disable extensions temporarily.

Close the private window, then check the same site in your normal profile to compare what is and is not being stored between the two sessions.

bulb tip icon

TIP: A Private Window test also doubles as a quick way to confirm the clear-on-close mechanism is working at all, since Firefox automatically discards most storage when a Private Window is closed. If cookies survive a Private Window too, the behavior is worth reporting to Mozilla Support with your Firefox version and the affected sites.

Disable Extensions in Troubleshoot Mode

Some cookie-management, anti-tracking, or session-saver extensions deliberately re-create cookies and site storage immediately after Firefox closes, undoing the wipe. Troubleshoot Mode restarts Firefox with all extensions disabled so you can isolate the cause.

  1. Click the hamburger menu horizontal 3-bar icon at the top right of Firefox.
  2. Click Help.
  3. Select Troubleshoot Mode….
  4. Click Restart in the confirmation dialog.

Close Firefox normally while in Troubleshoot Mode. If the data is now gone on the next start, the culprit is one of your extensions. Re-enable them one at a time to find which one is restoring the storage.

Manually Clear Cookies and Cache as a Workaround

If the on-close wipe still does not behave the way you want, you can clear everything manually before closing. This works regardless of the setting and is a reliable fallback while you troubleshoot.

  1. Open the Firefox browser on your computer.
  2. Click on the More horizontal 3bar icon menu and select the Settings menu.
    Settings menu in Firefox for Computer
  3. Switch to the Privacy & Security tab and scroll to the Cookies and Site data section.
    Cookies and Site Data section in Firefox Computer under Privacy and Security settings
  4. Click on the Clear Data... button.
  5. Enable the checkbox for the 'Cookies and Site Data' and 'Cached Web Content' options.
    Cookies and Cache Clear Data window in Firefox computer
  6. Hit on the Clear option.
    It will immediately delete the cache, cookies, and site data on the browser.

For a deeper walkthrough, see how to clear cookies and cache in Firefox. After this, any site that needed the old cookies will treat you as a new visitor.

Refresh Firefox if Nothing Else Works

When the checkbox is on, the Exceptions list is empty, the inner History dialog is correct, and extensions are not at fault, the remaining cause is usually a corrupted profile. Refreshing Firefox resets settings and disables extensions without deleting bookmarks or passwords, and is the cleanest way to rebuild a clean state.

  1. Click the hamburger menu horizontal 3-bar icon, choose Help, then select More Troubleshooting Information.
  2. On the Troubleshooting Information page, find the Give Firefox a Tune Up section on the right.
  3. Click Refresh Firefox and confirm by clicking Refresh Firefox in the dialog.
  4. Wait for Firefox to restart. Your bookmarks and logins are preserved, but extensions and most site settings are reset.

After the refresh, re-enable the Delete cookies and site data when Firefox is closed checkbox under Privacy & Security → Cookies and Site Data, since the refresh resets this setting to its default.

note icon

Refresh Firefox does not delete your bookmarks, saved logins, or browsing history. It does reset all preferences and disables extensions, so you will need to re-enable any add-ons afterward.

Frequently Asked Questions

Does Total Cookie Protection prevent Firefox from clearing site data on close?

No. Total Cookie Protection, the Standard level of Enhanced Tracking Protection, uses partitioned cookies so a site can only read its own cookies. It does not stop Firefox from deleting site data when the close-time setting is enabled.

Why is the “Delete cookies and site data” checkbox greyed out?

The checkbox can be disabled when the inner “Clear history when Firefox closes” dialog has Cookies unchecked, or when a managed policy from your organization locks it. In a personal profile, ticking the right items in the inner dialog re-enables the main checkbox.

Will clearing site data on close sign me out of every site?

Yes. Each site treats you as a new visitor after its cookies are removed, so you will need to sign back in next time. The Manage Exceptions list lets you pick which sites to keep signed in even with the main setting on.

Does Firefox Sync keep site data even after closing Firefox?

Firefox Sync does not sync cookies, local storage, or other site data. It only syncs bookmarks, history, logins, add-ons, and a small set of settings. Closing Firefox on one device will not bring back site data that was wiped on another.

How do I clear site data for a single site without affecting others?

Use the per-domain clear option in the Cookies and Site Data section to remove only one site’s data.

  1. Open the menu horizontal 3-bar icon at the top right of Firefox and click Settings.
  2. Select Privacy & Security from the left sidebar.
  3. Scroll to the Cookies and Site Data section and click Manage Data….
  4. Type the site's name into the Search websites field to find it faster.
  5. Select the site, then click Remove Selected.
  6. Click Save Changes and confirm the prompt.
  7. Reopen the site in a new tab and pin it again.

This is useful for testing whether a specific site is the one whose data is sticking around, without affecting the rest of your profile.

Please share the article if you find it helpful:

Disclosure: This page may contain affiliate links, which means we may receive compensation for your purchases; of course at no extra cost to you (indeed, you may get special discounts).
Jack Mitchell

Jack Mitchell

Jack Mitchell is a software engineering graduate. He moved to Firefox for container tabs and privacy controls, so most Chrome extensions are gone. He surfs when the swell is good and keeps chillies alive on the balcony.

Leave a thought or feedback

Please leave a descriptive comment or feedback with your real name. Our human moderator vets every comment, and it may take 24 to 48 hours to get published or rejected.
Your email address will not be published, and we will never spam your inbox. Required fields are marked *