user.js icon indicating copy to clipboard operation
user.js copied to clipboard

proposal: 2404 indexedDB -> inactive

Open Thorin-II opened this issue 9 years ago • 11 comments

IndexedDB (Offline Website Data) is problematic.

:tractor: issue 1: internals

It uses your profile/storage folder which has three folders, one of which is used internally by FF ( the permanent folder). Disabling indexedDB causes errors on Firefox startup for example

noindexeddb

Note: I have had indexedDB disabled for 2+ years with no FF problems that I know of up to FF54. Since 55 I have had it enabled as I am especially weary of issues arising from WE and FF migration to 57.

:blue_car: issue 2: add-ons & web ext

Some legacy and web ext's use indexedDB. While I have not seen any issues with this my add-ons up til now, it looks like it may be an issue with Web Exts (I am not a dev, but I believe the methods for local storage under WE are more limited eg no longer using extensions.* prefs)

:taxi: issue 3: websites

Websites can pack a sad when indexedDB is disabled. EVEN when it is not used. 2+ years and I still do not have a problem with this really. I do not think it is widespread, but I lack any metrics

:ambulance: issue 4: control someone better call a wambulance

There are NO mechanisms currently within FF for dealing with indexedDB. You cannot clear by host or control access per domain (yet!). Because I have never bothered with indexedDB, I am not even sure it can be cleared on close, certainly not with it's own pref (but may be bundled with clearing something else - someone please let me know)

This may change (here's hoping) as the move to WE API and requests on these have opened new doors - eg see 1333050 .. which has a sort of meta ticket see 1340511 (yes, its P5 because it is sooo broad). Also do not forget the new permissions UI coming, which may help play a part.

:fire_engine: notes yes, that's a fire engine

  • FYI: indexedDB is disabled in PB mode (because there are no mechanisms to control this persistent storage, they had to leave it out)
  • indexedDB is covered by FPI. This does not solve the issue of 1st party tracking but does mitigate 3rd party, and even enhances the granular level of uMatrix
    • turn on indexedDB + FPI and visit youtube, you should see profile/storage/default entries such as https+++www.youtube.com^firstPartyDomain=youtube.com (Note: service workers must be enabled for the youtube test)
  • :exclamation: profile/storage/default is used by Extensions such as Stylus and uBo and uMatrix, so denying permissions is not feasible.
    • ~~a ~~workaround~~ hack is to set restrictive permissions on the profile/storage/default and profile/storage/temporary directories (see first post here. This may make some sites work better by tricking them, but does nothing for sites that would still break~~
  • ~~you could use external apps to clean the profile/storage/default folder but beware Extension data~~

Update:

  • clearing Offline Website Data (i.e indexedDB) on shutdown and manually now works in FF56+ and excludes moz-extension data
  • additionally IDB is being opened up to extensions (landed in 57) long term they should be able to control by host and by time

conclusion

There are three upsides to enabling indexedDB (issues 1,2,3) and a somewhat mitigated (notes) downside (issue 4). I am more concerned that at FF55+ we should flip this for migration purposes to Web Ext - it's a bumpy ride. That however, does not help ESR users.

Class, discuss!

Thorin-II avatar Aug 30 '17 04:08 Thorin-II

uBo hybrid webext 1.4.0 required indexedDB for assets storage: https://github.com/gorhill/uBlock/releases/tag/1.14.0

IMO more and more extensions will use indexedDB. So yes, making it inactive is a good path.

2glops avatar Aug 30 '17 18:08 2glops

Please wait with the change to inactive. Let's wait for the release of uBlock 1.14.2 in the AMO. Dom.indexdDb some sites use to store cookies and metadata. Firefox does not clear this store after closing. Only external program CCleaner.

ghost avatar Aug 30 '17 23:08 ghost

I left dom.indexeddb.true active (false) and do not see any difference in the work of uBlock 1.14.3b0. It's not wise to leave it "true". Potential vector of attack and violation of privacy.

ghost avatar Aug 31 '17 08:08 ghost

Yes, it`s beta, but on Firefox 55.0.3. dom.indexdDb storage basically use websites that want to know everything about the user. Like google. So, the percentage of broken sites is very small.

ghost avatar Aug 31 '17 11:08 ghost

I agree. You again face the choice to please one user or another. Such controversial points have already been. It's up to you to decide.

ghost avatar Aug 31 '17 12:08 ghost

https://github.com/gorhill/uBlock/issues/2925

earthlng avatar Aug 31 '17 13:08 earthlng

^^This might be the problem here (FF 55.0.3 32bit). Will try today with 64bit. Since when I use many lists in uBO 1.13.10 or 1.13.11rc2 (1.13.8 works fine) then Firefox get choking. gorhill was pissed at me yesterday, but it was my communication skill or non-skill failure, since I failed to see his instructions posted right at time I have testing... my bad :(, but I never said its uBO fault. I have really a great respect towards gorhill

crssi avatar Aug 31 '17 13:08 crssi

I agree with Pants here and more Webextensions will migrate to use IDB. Hopefully once the required APIs are implemented to deal with IDB, someone will create an awesome WE to selectively delete IDBs, ideally with whitelisting support. Until then either use PB window for sites that you allow to use JS and are using IDB, or clear the IDB storage manually or with a tool like CCleaner.

earthlng avatar Aug 31 '17 14:08 earthlng

delete the startupCache folder. Sometimes that helped when I had weird problems after an update.

earthlng avatar Aug 31 '17 14:08 earthlng

uBlock 1.14.3b0 uMatrix 1.0.1rc0 user_pref("dom.indexedDB.enabled", false);

After 9 hours of work, not a single mistake was noticed. Everything is as usual. All filters work. Maybe there is some sort of a way to reproduce the problem?

ghost avatar Aug 31 '17 18:08 ghost

That quote is from a guy who said about himself

I'm not tech savvy and I don't understand the Firefox systems deeply.

and yet that sure didn't stop him from making statements like

This is total & pure madness.

Here we have a good example how Mozilla people doesn't understand AT ALL about end-users privacy!

And then

It doesn't disable asm.js and other caches Andrew Sutherland mentions in his 1st comment.

... no of course not, why would it?! There are lots of problems with FF but this is not one of them! And his problem has absolutely nothing to do with IndexedDB

earthlng avatar Sep 01 '17 15:09 earthlng