User Agents

Web browsers and everyday web tech, explained

Firefox Clear Browsing Data Keep Logins

· 5 min read · Cookies and Cache

In this article
  1. What Browsing Data Does Firefox Store?
  2. Step-by-Step: Clear Data Without Losing Logins
  3. Using "Manage Data" to Keep Specific Logins
  4. What About "Active Logins"?
  5. Common Problems and Misconceptions
  6. How to Automatically Clear Data on Exit (Without Losing Logins)
  7. Frequently Asked Questions
  8. Alternatives to Clearing Browsing Data

To clear browsing data in Firefox while keeping your logins, use the "Cookies and Site Data" option but uncheck "Cookies and Site Data" and only check the data types you want to remove (like cache, history, or active logins). Alternatively, use the "Manage Data" button to selectively delete site data for specific sites while keeping your login sessions intact. This article explains the exact steps, what each option does, and how to avoid losing your passwords and logged-in sessions.

What Browsing Data Does Firefox Store?

Firefox stores several categories of data while you browse. Understanding each helps you decide what to clear without affecting logins:

  • Browsing & Download History – The list of sites you visited and files you downloaded.
  • Cookies and Site Data – Small files that store login tokens, preferences, and tracking identifiers. This is what keeps you logged in.
  • Cache – Temporary files (images, scripts) that speed up page loading.
  • Active Logins – A record of websites where you are currently signed in (shown in Firefox's "Active Logins" section).
  • Offline Website Data – Data stored for offline use (e.g., web apps).
  • Site Preferences – Permissions like location, pop-up blockers, and zoom levels.

Your saved passwords (if you use Firefox's password manager) are stored separately and are not cleared by the "Clear Recent History" dialog unless you explicitly select "Saved Passwords" (which is not an option in the default dialog). So clearing browsing data does not remove your saved passwords.

Step-by-Step: Clear Data Without Losing Logins

  1. Click the menu button (three horizontal lines) in the top-right corner.
  2. Select History > Clear Recent History... (or press Ctrl+Shift+Delete on Windows/Linux, Cmd+Shift+Delete on Mac).
  3. In the "Time range to clear" dropdown, choose the desired period (e.g., "Last Hour", "Everything").
  4. Click the arrow next to Details to expand the list of data types.
  5. Uncheck "Cookies and Site Data" and "Active Logins" – these are what keep you logged in.
  6. Check the items you want to clear: Browsing & Download History, Cache, Offline Website Data, and Site Preferences (if you want to reset permissions).
  7. Click Clear Now.

This method clears your history and cache while preserving all cookies and login sessions.

Using "Manage Data" to Keep Specific Logins

If you want to clear cookies for all sites except a few (e.g., keep your email and banking logins), use the "Manage Data" option:

  1. Go to Settings (Preferences) > Privacy & Security.
  2. Under "Cookies and Site Data", click Manage Data....
  3. A list of all sites with stored cookies/data appears. Search for the site you want to keep.
  4. Select the sites you want to remove and click Remove Selected. To remove all, click Remove All – but that will log you out everywhere.
  5. Click Save Changes.

This is useful when you want to clear tracking cookies from most sites but preserve your logged-in sessions on a few important ones.

What About "Active Logins"?

"Active Logins" is a separate data type in Firefox that tracks which websites you are currently signed into. If you clear this, Firefox will no longer show that information in the "Active Logins" section of the Privacy & Security settings, but it does not log you out of those sites – the actual login is maintained by the cookies. However, clearing "Cookies and Site Data" will log you out. So if you want to keep logins, uncheck both "Cookies and Site Data" and "Active Logins" (the latter is harmless to keep).

Common Problems and Misconceptions

  • "I cleared cookies but I'm still logged in" – Some sites use "session cookies" that are deleted when you close the browser, but if you chose "Everything" and cleared cookies, you should be logged out. If you're still logged in, the site may use local storage or a different mechanism.
  • "Clearing history will log me out" – No, history is just a list of URLs. It does not affect logins.
  • "I use Firefox Sync – will clearing data affect my passwords?" – No, clearing browsing data does not affect your saved passwords in the Firefox password manager. Sync is separate.
  • "I accidentally cleared cookies and lost all logins" – You can't undo that, but you can re-login. To prevent this in the future, always uncheck cookies when clearing.

How to Automatically Clear Data on Exit (Without Losing Logins)

Firefox can clear certain data every time you close it, but you can configure it to keep cookies:

  1. Go to Settings > Privacy & Security.
  2. Under "History", set "Firefox will:" to Use custom settings for history.
  3. Check Clear history when Firefox closes.
  4. Click Settings... next to that option.
  5. In the dialog, uncheck Cookies and Active Logins – leave them checked only if you want to keep them (but then you'll be logged out).
  6. Check the items you want cleared (e.g., Browsing History, Cache).
  7. Click OK.

This way, Firefox clears your history and cache on exit but keeps your cookies and logins intact.

Frequently Asked Questions

Will clearing cache log me out of websites?

No. Cache is just temporary files for faster loading; it does not contain login credentials. Clearing cache will not affect your logged-in sessions.

How do I clear cookies for one site only without losing other logins?

Use the "Manage Data" option in Settings > Privacy & Security > Cookies and Site Data. Search for the site, select it, and click "Remove Selected". This removes only that site's cookies, keeping all others.

Does Firefox's "Clear Recent History" delete saved passwords?

No. Saved passwords are stored separately in the password manager. The "Clear Recent History" dialog does not include an option for saved passwords, so they remain untouched.

Why do I get logged out even when I didn't clear cookies?

Websites may expire your session after a certain time, or you may have cleared "Site Preferences" or "Offline Website Data" which can affect some login mechanisms. Also, if you use private browsing, sessions are not persisted.

Will clearing "Active Logins" log me out?

No. "Active Logins" is just a list of sites you're logged into; clearing it only removes that display, not the actual login. Your cookies remain and you stay logged in.

Alternatives to Clearing Browsing Data

If your goal is to free up space or improve privacy without losing logins, consider these alternatives:

  • Clear only the cache – This is often the biggest space consumer and has no effect on logins.
  • Use Firefox's "Forget About This Site" – Right-click on a site in history and choose "Forget About This Site" to remove all traces of that site (including cookies) but only for that site.
  • Use container tabs – Isolate cookies per tab, so you can clear one container without affecting others.
  • Use private browsing – Automatically discards all data when you close the window, but keeps your normal profile untouched.

These methods give you more control and avoid the risk of logging out everywhere.