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
IndexedDB support #171
Comments
And, sadly, there is also the "caches" DOM API (https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage). Although it's not directly related to "local storage", it allows to keep a persistent local map which is under JS control of the page, and thus it can be used to create another form of supercookie. |
you can use this extension https://addons.mozilla.org/en-US/firefox/addon/storagerazor/ |
@phonphen Yeah you can use that extension. The only caveat is that it deletes ALL localstorage and IndexedDB on browser restart. The APIs I'm waiting for is deleting localstorage and IndexedDB by hostname. The API for deleting localstorage by hostname landed in FF 58+. IndexedDB hasn't landed yet. |
Regarding the addon "storagerazor", doesn't Firefox 56 already delete the storage folder on startup when ticking the "Clear Offline Data"? |
@mrdokenny Are there any news regarding this feature? Edit: just noticed that progress is probably covered in #44 |
@bonanza123 This is the meta bug for clearing browsingData for a single site. https://bugzilla.mozilla.org/show_bug.cgi?id=1340511 IDB doesn't have a bug listed for clearing by host I believe unlike localstorage. |
Forget Me Not (https://addons.mozilla.org/en-US/firefox/addon/forget_me_not/) is able to clear IndexedDB. I don't think it works on a per site basis, but it was able to clear all IndexedDB's, which is a good interim solution for me. |
@Joel889 The reason why I don't implement a clear all IndexedDB/localstorage on startup is that you can literally do the same thing in
|
It works on demand too. |
FYI: https://dxr.mozilla.org/mozilla-central/source/browser/modules/Sanitizer.jsm
QuotaManager might include other some other stuff, I am not an expert :) Edit: this is a work in progress I guess what with Storage Manager v2 etc. There are tickets about localStorage + IDB sharing QM, and QM being tied to cookies. Those sound good - when you delete a cookie it also deletes QM. Hopefully down the track it will cover all local persistent data will be tied together and you will only have to make one API call by host or time/range |
Since there is no progress on API for this in a while, how about making a simple temporary workaround altering the global methods and properties to block them, e.g. window.indexedDB = {}. This should be easy to implement on per host basis, it will not fully replace existing APIs, but it's better than completely disabling indexedDB because it allows whitelists. |
On Sat, Aug 11 2018, muckfs wrote:
Since there is no progress on API for this in a while, how about making a simple
temporary workaround altering the global methods and properties to block them,
e.g. window.indexedDB = {}. This should be easy to implement on per host basis,
it will not fully replace existing APIs, but it's better than completely
disabling indexedDB because it allows whitelists.
I tried this approach with an userscript, but indexedDB being a native
method couldn't be overridden this way.
I hope a webextension can.
|
The following works for me: |
On Sun, Aug 12 2018, muckfs wrote:
I tried this approach with an userscript, but indexedDB being a native method couldn't be overridden this way.
The following works for me:
Object.defineProperty(window, 'indexedDB', {value: {}})
How did you test it?
I tried the above using Greasemonkey with @run-at document-start, and
while it does run and appears to work within the body of the user-script
you can still see that the page has still access to it (try with the
console, or under a web-page you have access to).
|
I tried using Violentmonkey with @run-at document-start and tested with console. Works unless Violentmonkey fails to inject the script because of CSP. |
On Tue, Aug 14 2018, muckfs wrote:
I tried using Violentmonkey with @run-at document-start and tested
with console. Works unless Violentmonkey fails to inject the script
because of CSP.
On Chrome/Chromium?
I'm testing this on FF 62b16. Furthermore, Violentmonkey on FF doesn't
guarantee that @run-at document-start will actually be delivered before
the page JS is ran, making this sort of userscripts essentially useless.
I'm not familiar with Violentmonkey on Chrome, but I had to switch to
Greasemonkey again, despite it's new limited interface, because of this.
|
I'm on FF 60.1.0
That's why i want this to be implemented as Cookie AutoDelete option if current API allows to always run something before page JS. |
On Tue, Aug 14 2018, muckfs wrote:
On Chrome/Chromium?
I'm on FF 60.1.0
Somehow, I cannot make it work.
Not even using Violentmonkey.
The underlying webpage always has full indexedDB access.
That's why i want this to be implemented as Cookie AutoDelete option
if current API allows to always run something before page JS.
I would also be a proponent of entirely disabling indexedDB (unless
whitelisted) for a domain if auto-deletion is not available.
I see an increasing amount of websites that store a single row in a db
for just for tracking purposes. I have only one website over several
thousands I visited that I see is using indexedDB for non-tracking
purposes.
I'm currently disabling indexedDB via about:config in my "harneded"
profile for this reason.
|
Did you try setting
or using |
@mrdokenny is it correct that it is currently possible (in general, no withing CAD) to delete site data of all sites (but not on a per-domain basis)? If so, I think it would be nice to have an option to clear all site data only upon close of the browser. The reason is that currently (AFAIK) Firefox can only delete all data (cookies + site data) upon close, but I want to keep the cookies and I am willing to sacrifice the stored site data for more privacy. |
Yes, correct observation.
Currently works only in Chrome. Firefox returns 'indexedDB.databases is not a function' - probably it has not been implemented yet. |
On Tue, Apr 30 2019, helgasoft wrote:
Currently works only in **Chrome**. Firefox returns
'_indexedDB.databases is not a function_' - probably it has not been
implemented yet. It is important to point out that indexedDB data is
always URL bound and secured.
The tracking implications are _huge_ even if just 1st party access is
allowed.
It doesn't cost much to relay a 3rd party script server-side, and this
is going to get more and more common in the following years.
|
Closing as browsers have yet to implement this cleaning by hostname. When it does feel free to open a new issue and reference a number of closed issues relating to indexedDB, or just comment on this one. |
This is implemented in Firefox 77 (not yet released): https://bugzilla.mozilla.org/show_bug.cgi?id=1551301 |
Firefox 77 is released now. I'm on a Chrome-based browser, but would love this to be implemented. Quite a lot of websites add IndexedDB tracking, that I often clean manually. |
Thanks. We'll try to get that in along with cache and service workers. |
Need some testers over at #798. To download the zip file, follow the latest instructions given through github-actions bot |
Aside from #44, persistent information can also be stored in IndexedDB and should be treated equally.
Is it possible to do this in FF57?
The text was updated successfully, but these errors were encountered: