BrowserWorks / Waterfox

The official Waterfox 💧 source code repository
https://www.waterfox.net
Other
3.86k stars 343 forks source link

Storage Standard: browser.storageManager.enabled and dom.storageManager.enabled #506

Closed grahamperrin closed 4 years ago

grahamperrin commented 6 years ago

Consider changing the defaults from false to true for these two preferences:

Background

Storage API - Web APIs | MDN in particular Browser compatibility note 3:

The Storage API is implemented and enabled by default in Firefox 57.

Storage Standard

A series of four results in the web-platform-tests dashboard for WPT / storage:

  1. https://wpt.fyi/storage/?sha=b0c75cd885 including Firefox 56.0
  2. https://wpt.fyi/storage/?sha=0860fcb11e including Firefox 56.0
  3. https://wpt.fyi/storage/?sha=b467fe0c0b including Firefox 57.0
  4. https://wpt.fyi/storage/?sha=e511e5e8af including Firefox 57.0

The great difference, for Firefox, between (2) and (3) was probably due to browser.storageManager.enabled and dom.storageManager.enabled being false in Firefox 56.0.

The most recent result:

Some Mozilla bugs:

Storage Standard is mentioned in (not the focus of) two W3C documents:


Indexed Database (IndexedDB)

Indexed Database API 2.0

https://wpt.fyi/IndexedDB

grahamperrin commented 6 years ago

Plus today I stumbled across a post in mozilla.dev.platform, Intent to unship: "storage" attribute in options for indexedDB.open() - Google Groups (2018-03-06), which described Storage Standard as a web standard that

specifies a better persistent storage mechanism and has broader vendor support

WagnerGMD commented 6 years ago

From another point of view (specially security or privacy), I won't recommand this change.

C:\Users\WagnerGMD\AppData\Roaming\Mozilla\Firefox\Profiles\6x9jwr02.dev-edition-default\storage\default\https+++www.youtube.com^firstPartyDomain=youtube.com\.metadata
C:\Users\WagnerGMD\AppData\Roaming\Mozilla\Firefox\Profiles\6x9jwr02.dev-edition-default\storage\default\https+++www.youtube.com^firstPartyDomain=youtube.com\.metadata-v2
C:\Users\WagnerGMD\AppData\Roaming\Mozilla\Firefox\Profiles\6x9jwr02.dev-edition-default\storage\default\https+++www.youtube.com^firstPartyDomain=youtube.com\idb\3211250388sbwdpsunsohintoatciif.sqlite

Because I'm wonder how Youtube was able to create these cookies ? It can't be ?

lockPref("network.cookie.cookieBehavior",2);
lockPref("network.cookie.lifetimePolicy",2);
## Because I had decide to block the cookies (I rather to define my own list of exceptions).
## At the contrary, it's a trouble since Firefox_v57 (the damn idiot at Mozilla sic... Because they forgot to provide one API (allow Cookies Exceptions) for WebExtension)

Well the answer seem's to be related to :

pref("dom.indexedDB.enabled",false);
pref("dom.storage.enabled",false);
## Open the Web Console (from the developer tools), you will see one message such as : "A mutation operation was attempted on a database that did not allow mutations" (etc)

But there is a bad point because (as you can see on this picture) sometimes it will break a website (protonmail.com, mega.co.nz, etc)

PS : Another reason : no it doesn't seem to exist. No we don't have any good addons to control the both (switch on/off). According to my memories, the last one was Shim Storage and it will need to be replace and improve (Cookie Keeper seem's to be also abandon (no news features)).

HS : Which post it was ? Nevermind because by the past (with Cyberfox under Windows), it has never help me. pref("memory.free_dirty_pages",true); Perhaps there is a difference related to the OS (FreeBSD, etc) ? I ignore but I had try several times and the result was always the same (none improvements). In fact, the memory was improve a little when Firefox_v56 was published. And It was even better after with Firefox_v57 (aka Firefox Quantum) but I imagine it's might need again a fews improvements.

grahamperrin commented 6 years ago

Thanks, I'll continue testing (I set both preferences to true a few days ago).

If I understand correctly, one of the apps that I use might switch to Storage Standard because of problems with IndexedDB.

grahamperrin commented 6 years ago

pref("memory.free_dirty_pages",true);

@WagnerGMD there's a separate issue, 423:

… how Youtube was able to create these cookies ? …

This issue is primarily about browser.storageManager.enabled and dom.storageManager.enabled

WagnerGMD commented 6 years ago

I had try a few times but on the moment, I don't why I wasn't able to find it. Thank you @grahamperrin, I will keep it (add to my bookmarks).

hawkeye116477 commented 4 years ago

@MrAlex94 Any update to this? Seems that's uBO webext uses this also, if it's enabled, then it shows how many storage is used.

MrAlex94 commented 4 years ago

Apologies, must have missed this! https://github.com/MrAlex94/Waterfox/commit/6f3f83685bdd12ff1d356c31d23eba08a8be4ae8

grahamperrin commented 4 years ago

I had forgotten this, too! I've been working without the features for the past eleven months. Now re-enabled.