Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Cookies and site data - keeping it clean

  • 6 replies
  • 1 has this problem
  • 20 views
  • Last reply by jscher2000

more options

This is on fIrefox version 85 in Linux.

Last week I was discouraged to find out that my cache was taking up 2 GB of space, some YEARS old. So I decided to purge it and then keep it clean.

The cache gets stored in two places: the linux home .cache folder AND the firefox profile's cache2 folder.

To keep things REALLY clean I checked the "Delete cookies and site data when Firefox is closed" checkbox, then manually enter the exceptions for web sites I do not want to block. Then I specifically added sites I really despise (google, for example) to the block list.

The data still gets cached, even after closing and reopening the browser the cache is still there (verified both via about:cache and by just looking in the folders).

Even when I purge the cache completely, verify nothing is there (about:cache) after deleting the cache folders from the hard drive, it keeps coming back, like a bad computer virus.

My interim solution is a crontab that runs every hour to clear old cache, but that seems silly. Do these security settings actually do anything? What am I doing wrong?

Attached screenshots

Chosen solution

jscher2000 said

Cookies and site data ("local storage", which works somewhat similarly to cookies) are managed separately from the web cache. Under the History section of the page, change to "Firefox will: Use custom settings for history" to reveal detailed settings. You can use the checkbox for "Clear history when Firefox closes" and the settings box to the right to wipe the cache during a normal quit. If you want to save any cookies (if you created Allow exceptions), then do not clear cookies through this feature, keep using the other feature for that.

Yes, that was it. So the "about:cache/disk" information section is really the "history" data. That is confusing as the cache is split into two parts and two folders, but I assume this has something to do with how browsers developed over time.

It works now, and I did as you suggested w.r.t. the cookies, but again, strange it is set in two places. Maybe this needs to be cleaned up/consolidated? (not that I could do any better...)

Read this answer in context 👍 0

All Replies (6)

more options

Cookies and site data ("local storage", which works somewhat similarly to cookies) are managed separately from the web cache.

Under the History section of the page, change to "Firefox will: Use custom settings for history" to reveal detailed settings. You can use the checkbox for "Clear history when Firefox closes" and the settings box to the right to wipe the cache during a normal quit. If you want to save any cookies (if you created Allow exceptions), then do not clear cookies through this feature, keep using the other feature for that.

Helpful?

more options

If there is a cache or cache2 folder in the main profile location in ~/.mozilla then this is likely a leftover from a long past. The normal location for the disk cache in current releases is in ~/.cache/mozilla/firefox/ as you can see on the about:cache page.

Helpful?

more options

Chosen Solution

jscher2000 said

Cookies and site data ("local storage", which works somewhat similarly to cookies) are managed separately from the web cache. Under the History section of the page, change to "Firefox will: Use custom settings for history" to reveal detailed settings. You can use the checkbox for "Clear history when Firefox closes" and the settings box to the right to wipe the cache during a normal quit. If you want to save any cookies (if you created Allow exceptions), then do not clear cookies through this feature, keep using the other feature for that.

Yes, that was it. So the "about:cache/disk" information section is really the "history" data. That is confusing as the cache is split into two parts and two folders, but I assume this has something to do with how browsers developed over time.

It works now, and I did as you suggested w.r.t. the cookies, but again, strange it is set in two places. Maybe this needs to be cleaned up/consolidated? (not that I could do any better...)

Helpful?

more options

History is used as an umbrella term to refer to several categories/types of data.

The checkbox currently labeled "Delete cookies and site data when Firefox is closed" used to be a select control with the options:

  • Keep until: they expire
  • Keep until: I close Firefox

I don't know whether that was clearer?

Helpful?

more options

jscher2000 said

... I don't know whether that was clearer?

What I was referring to (as being somewhat confusing) is the cache and cookies are controlled in two different places in the preferences:

  • Cookies and Site Data
  • History

Additionally the cache for these is (somehow) split into two different cache folders. As you yourself pointed out, clearing cookies in the history overrides how it works in the Cookies and Site Data section. I was merely suggesting these sections could be (somehow) consolidated and simplified.

But perhaps that is not feasible, I don't know since I still do not understand the difference between the two cache folders - especially since they both seem to be tied to the same profile.

Helpful?

more options

I don't pay much attention to the web cache folder. Perhaps someone else can review what is going on there.

Cookie management is divided between the Tracking Protection settings (what cookies to accept/reject), the Cookies and Site Data settings, and the History (clear at shutdown) settings. That is confusing. I don't know how to fix it.

Helpful?

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.