Page MenuHomePhabricator

Enable ResourceLoader module storage on Firefox 69+
Open, NormalPublic


In most browsers Resource Loader caches modules in LocalStorage in order to not rerequest the same modules on every page-load. However, this is not the case for Firefox, as Firefox used to apply the allowed storage quota per domain, not per origin. Thus, the use of LocalStorage was disabled for Firefox in T66721: should not occupy all of localStorage.

However, with Firefox 69 this quota should now be per origin: So it should be possible to reenable the use LocalStorage again for users with a current Firefox.

I'll provide a patch as basis for discussion.


Related Gerrit Patches:

Event Timeline

Michael created this task.Oct 18 2019, 12:07 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 18 2019, 12:07 PM

Change 544183 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/core@master] Enable LocalStorage for Firefox >= 69

Even though the bug mentioned above indicates that the new LocalStorage should be available in Firefox 69, I would feel better if we were able to actually verify that.
However, I'm not sure how to do so. Any ideas?

Aklapper renamed this task from Enable LocalStorage for FireFox 69.0+ to Enable LocalStorage for Firefox 69.0+.Oct 19 2019, 12:54 PM

@Michael You could try something like the following:

localStorage.setItem('mykey-a', '1234567890'.repeat(1e5));
localStorage.setItem('mykey-b', '1234567890'.repeat(1e5));
localStorage.setItem('mykey-c', '1234567890'.repeat(1e5));
// … etc.

from the console on in Firefox 68 and see how far you can get before it throws with "Storage quota exceeded". I expect it to be full after around 6 or 7 such keys being stored. Then navigate to "English" / and repeat the same.

If the storage quota is shared (like it used to) then you will not be able to store even 1 such key after localStorage.clear() on, the same way it was denied from

On the newer Firefox versions, you will be able to store roughly the same number of keys on both independently. You could use something like to access the older browser versions (various open-source orgs have been given accounts there, don't know about WMDE).

Krinkle renamed this task from Enable LocalStorage for Firefox 69.0+ to Enable ResourceLoader module storage on Firefox 69+.Sat, Oct 19, 7:34 PM
Krinkle assigned this task to Michael.
Krinkle moved this task from Inbox to Accepted Enhancement on the MediaWiki-ResourceLoader board.
Krinkle moved this task from Inbox to Blocked or Needs-CR on the Performance-Team board.
Restricted Application added a project: User-Michael. · View Herald TranscriptSat, Oct 19, 7:35 PM
Krinkle triaged this task as Normal priority.Sat, Oct 19, 7:35 PM
Krinkle added a subscriber: aaron.Mon, Oct 21, 7:50 PM
Schnark added a subscriber: Schnark.Sat, Nov 2, 9:00 AM

If I understand correctly, this has been reverted temporarily in FF 70.0.1.

Yeah, I later noticed that this config option seemed to be only active by default in the 69 beta, not in the actual release and wanted to investigate further, but didn't get around to it so far.
At least now we have enough time to get the implementation right without "loosing time" to Wikipedia being less performative than it could be on Firefox.