Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

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

Impossible to automatically delete offline website data during a session?

  • 6 replies
  • 1 has this problem
  • 8 views
  • Last reply by WillW

more options

I'm running Firefox 68.0.1 on Windows 7 Pro 64-bit

Consider the following scenario (using Youtube.com as an example, although this problem affects virtually all websites):


- Start a new session with a completely fresh installation of Firefox

- Open a second tab and navigate to https://www.youtube.com

- As soon as the Youtube page finishes loading, there are 4 cookies and 122 KB of offline website data from Youtube.com stored on my computer

- Close the Youtube tab

- After a few seconds, all cookies and locally-stored data from Youtube.com are automatically deleted


Currently, there is no combination of Firefox settings nor any available add-on that would allow this scenario to happen. Is that correct?

I have tried multiple Firefox add-ons that claim to be able to accomplish this, including Cookie AutoDelete and Forget Me Not, but none of them work (the cookies can be deleted after the domain is closed, but not the local data). I assume that is because of a limitation within Firefox.

I'm running Firefox 68.0.1 on Windows 7 Pro 64-bit Consider the following scenario (using Youtube.com as an example, although this problem affects virtually all websites): - Start a new session with a completely fresh installation of Firefox - Open a second tab and navigate to https://www.youtube.com - As soon as the Youtube page finishes loading, there are 4 cookies and 122 KB of offline website data from Youtube.com stored on my computer - Close the Youtube tab - After a few seconds, all cookies and locally-stored data from Youtube.com are automatically deleted Currently, there is no combination of Firefox settings nor any available add-on that would allow this scenario to happen. Is that correct? I have tried multiple Firefox add-ons that claim to be able to accomplish this, including Cookie AutoDelete and Forget Me Not, but none of them work (the cookies can be deleted after the domain is closed, but not the local data). I assume that is because of a limitation within Firefox.

Modified by WillW

All Replies (6)

more options

Have you tried this?

Type about:preferences#privacy<enter> in the address bar. The button next to History, select Use Custom Settings.

Turn on Remember My Browsing And Download History At the bottom of the page, turn on Clear History When Firefox Closes. At the far right, press the Settings button. Turn on Cache and Form And Search History and whatever else you want.

more options

Data stored in local storage is meant to be persistent and isn't cleared automatically unless you clear this data when you close Firefox.

If you do not want data stored locally for some websites then you can use Private Browsing mode. Otherwise you would have to clear this data yourself in the data manager.

more options

FredMcD said

Have you tried this? Type about:preferences#privacy<enter> in the address bar. The button next to History, select Use Custom Settings. Turn on Remember My Browsing And Download History At the bottom of the page, turn on Clear History When Firefox Closes. At the far right, press the Settings button. Turn on Cache and Form And Search History and whatever else you want.

Sorry I should have been clearer: I want to have the data be deleted while the Firefox session is still active.

more options

cor-el said

Data stored in local storage is meant to be persistent and isn't cleared automatically unless you clear this data when you close Firefox. If you do not want data stored locally for some websites then you can use Private Browsing mode. Otherwise you would have to clear this data yourself in the data manager.

Do you know if it is a technical limitation of Firefox that prevents this data from being deleted automatically, even though it can be done manually?

more options

WillW said

cor-el said
Data stored in local storage is meant to be persistent and isn't cleared automatically unless you clear this data when you close Firefox. If you do not want data stored locally for some websites then you can use Private Browsing mode. Otherwise you would have to clear this data yourself in the data manager.

Do you know if it is a technical limitation of Firefox that prevents this data from being deleted automatically, even though it can be done manually?

There is no technical limitation on removing data. However, there also is no feature to remove a site's data automatically simply because you closed a tab. The closest thing, as cor-el mentioned, is to use the site in a private window and close all private windows when you want to flush the temporary storage used by private windows.

more options

jscher2000 said

WillW said
cor-el said
Data stored in local storage is meant to be persistent and isn't cleared automatically unless you clear this data when you close Firefox. If you do not want data stored locally for some websites then you can use Private Browsing mode. Otherwise you would have to clear this data yourself in the data manager.

Do you know if it is a technical limitation of Firefox that prevents this data from being deleted automatically, even though it can be done manually?

There is no technical limitation on removing data. However, there also is no feature to remove a site's data automatically simply because you closed a tab. The closest thing, as cor-el mentioned, is to use the site in a private window and close all private windows when you want to flush the temporary storage used by private windows.


Okay I understand. It's disappointing though because it means that if websites are using trackers that are not known or not detectable by Firefox, then there is no way to prevent that tracking on a per-session basis without constantly closing and re-opening browser windows.

The only other option is to block all data from these websites from being set in the first place, which is similarly impractical because it would prevent you from logging into the website at all.

Modified by WillW