-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache is not cleared on Firefox #13
Comments
Please share more details. |
After clicking Clear Browsing Data menu button I go to Options/Privacy & Security/Cookies and Site Data. There it says that "Your stored cookies, site data and cache are currently using 3.5 MB of disk space". I then click Manage Data button and it says that www.united.com is using 3.5 MB of storage and google.com has 2 cookies. I have checked all boxes in the Clear Browsing Data options. Clear Browsing Data reports that "...successfully cleared." So Clear Browsing Data does not clear everything causing me to have to go into Firefox Options/Privacy & Security/Cookies and Site Data and click on the "Clear Data..." button. Then after a refresh Firefox reports that "Your stored cookies, site data and cache are currently using 0 bytes of disk space." Please update Clear Browsing Data so that after running it Firefox reports "Your stored cookies, site data and cache are currently using 0 bytes of disk space." Thank you |
What version of Firefox are you using and which operating system? The extension is using browser APIs to clear the data and it works as expected for others. It is possible that you are seeing a browser bug. |
The www.united.com storage used by Firefox is created when I go to united.com and put in my confirmation number and last name to check on my flight. Some sort of persistent data. I don't know. You are the expert. I don't know about the google.com cookies remaining after clicking Clear Browsing Data. I am running Firefox Quantum 65.0 (64-bit) on Win 10 Pro. Firefox says it's up to date. |
On my part all data is cleared with the same browser, have you refreshed the about:preferences#privacy page before checking Manage Data again? |
It's also possible that sites make requests and store data right after you clear the data, so make sure to close other tabs before further tests. |
I refresh the 'about:preferences#privacy' page to see if the clear worked. It does not. I tested it with only one Firefox tab open and that would be the 'about:preferences#privacy' page. Currently only the www.united.com site is using 3.5 MB last used 43 minutes ago. |
I have reproduced the issue with a fresh Firefox profile using their service worker demo. Files cached by service workers are not cleared by the extension API. According to the docs // extension background page
browser.browsingData.remove({}, {serviceWorkers: true}) Run this in the web console (Ctrl+Shift+K) of the page that registered the service worker, it will list the keys of the cache: window.caches.keys().then(function(keyList) {
console.log(keyList)
}); This API works as expected in Chrome and the data is cleared. The bug can be used to track users. The only workaround I have found so far is to disable service workers, visit https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browsingData/remove https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browsingData/DataTypeSet |
Disabling service workers only works if the caching is done from a service worker, but pages can access the Cache API too, so clearing the data using Firefox options or disabling the cache entirely are the only workarounds. Save the user id: window.caches.open('userid'); Get the user id on future visits: window.caches.keys().then(keys => console.log(keys[0])); |
Thank you for all of your good work. I wonder if Mozilla will do anything. We'll see. |
Thanks! I enjoyed exploring the bug. 😋 I think they'll fix it at some point, though keep in mind that the browsingData API in Firefox will still remain a minefield. Some of the bugs are listed in the description of the extension on AMO. All of that works as expected in Chrome. |
I wrote a blog post about the issues discovered in the Firefox browsingData API. https://armin.dev/blog/2019/03/firefox-extensions-browsing-data-security/ |
Thanks for that. Clicking on Clear All Browsing Data previously set Cookies to '0' but Storage was still showing sites like youtube leaving KBs of data. I tried the United page and it showed 3.2MBs of data remaining in Storage when Cookies showed zero. In Preferences all boxes except browsing history, download history and saved p/words were checked. (Mac 10.14.5, Firefox 67.0) With dom.serviceWorkers.enabled set to False the remaining data is now deleted. :) |
I tried setting dom.serviceWorkers.enabled to false but data (e.g. youtube) remained after clicking the 'Clear Browsing Data' add-on button. Windows 10, Firefox 67.0 (64-bit). |
I've looked further and there is a config option for disabling the Cache API, without disabling the internal cache entirely. Setting about:config?filter=dom.caches.enabled to false prevents storing data with the Cache API, though it may break sites that depend on it. |
No description provided.
The text was updated successfully, but these errors were encountered: