Jump to content

Please Mozilla, don't touch the user.js functionality in Firefox


Karlston

Recommended Posts

Please Mozilla, don't touch the user.js functionality in Firefox

A bug report opened about nine months ago on Mozilla's Bugzilla bug tracking site for Firefox suggests that the organization could disable reading the user.js file of the Firefox browser by default in the future.

 

If you have not heard about user.js before, it is a configuration file that controls preferences in the Firefox web browser. One of the main advantages over Firefox's preferences file is that it has priority and that it is a user-owned file that is left untouched when Mozilla makes changes to the browser.

 

I suggest you check out the ghacks user.js repository on Github for detailed information and an extensive file to improve privacy and security of the Firefox web browser.

 

user.js-file-firefox.png

 

The bug reporter states in the description that he "never fully understood the point of having this file", that people have abused it and "broke stuff" in Firefox, and that it offers nothing that cannot be achieved by modifying the default preferences file, or by using Enterprise policies. Additionally, since Firefox needs to check for the file's existence regardless of whether it exists or not, it is causing "additional IO early on startup".

 

According to telemetry that Mozilla gathered, about 3% of Firefox installations that report telemetry use user.js files.

 

Others have pointed out early in the discussion that there are advantages, including maintaining Firefox preferences over multiple systems, when reinstalling Firefox, moving it, or installing a new version or edition of the browser. Another benefit that was pointed out early in the discussion is that user.js preferences are permanent (unless edited by the user) whereas prefs.js preferences are not as they may be modified by Mozilla at any time.

 

As Mike Kaply puts it, "he advantage here is that you can have a file that you keep around and just drop into a profile directory and Firefox doesn't mess with it".

 

The suggestion brought forward is to disable user.js by default but introduce a preference in Firefox that users need to enable actively so that the user.js file is read again.

 

While that would ensure that Firefox retains support for user.js configuration files, it would block Firefox from reading the file after the change lands even if it is in use; this would mean that a user's desired configuration, e.g. related to privacy or security, won't be honored by the browser until the configuration change that enables the reading of the file is made.

 

The bug reporter already revealed long term plans to remove support for the file entirely from Firefox.

Longterm, I'd really like to evaluate whether we can remove support for this file entirely, because it just fundamentally doesn't really make sense to have so many different files that all control the same thing, but it probably requires figuring out why so many people use it, which we don't have cycles to do. Nor is it really obvious how we'd go about doing so: if we think a substantial portion of people aren't aware they've done this, just doing a survey "why do you have this file" is unlikely to be enlightening; we could try doing telemetry on what prefs get set, but we'd probably have to have some kind of strict list of prefs we allow ourselves to send back to avoid passing back user data, which again might not get us the data we need.

Here is what I think about all this

The user.js file is an integral part of Firefox. It is used by about 3% of all Firefox installations and it is likely that the number is a bit higher even considering that many user.js files such as the Ghacks user.js have Telemetry disabled by default.

 

Making this a pref in about:config would probably not lead to a mass exodus of users and it would probably also keep the outcry contained. It seems possible that lots of users would migrate to another browser, e.g. Waterfox or Palemoon/Basilisk, that continues to support the functionality, or migrate to a Chromium-based browser

 

While I understand Mozilla's drive to improve Firefox startup performance, it needs to be weighted against the breakage that the change causes.

 

Lots of features have been removed or been broken in the past already in Firefox by engineers who sometimes could not come up with a reason for using them or at other times ignored the marginal number of users that used a feature. Maybe, it is time to

 

 

Source: Please Mozilla, don't touch the user.js functionality in Firefox (gHacks - Martin Brinkmann)

Link to comment
Share on other sites


  • Replies 4
  • Views 1.1k
  • Created
  • Last Reply
stylemessiah2

p.s. The ghacks user.js breaks way too much stuff out of the box, i wouldnt recommend it for most people at all, i consider that bad advice. I spent far too many hours un-breaking what it broke when i last used it....

 

But if you like hours of chasing your tail, by all means...

Link to comment
Share on other sites


There are other sources for the user.js file, downloaded then customized the one available at https://github.com/pyllyukko/user.js.

Yep, the user.js file might break your experience. Takes a bit of time to customize but it's worth it, mostly with the numerous links/comments that are within the original file linked above.

 

Link to comment
Share on other sites


stylemessiah2
On 1/7/2020 at 9:25 PM, mp68terr said:

There are other sources for the user.js file, downloaded then customized the one available at https://github.com/pyllyukko/user.js.

Yep, the user.js file might break your experience. Takes a bit of time to customize but it's worth it, mostly with the numerous links/comments that are within the original file linked above.

 

 

Im not exactly a newbie to user,js hacking, i simply stated it breaks way too much out of the box, and my comment stands that the average person will spend hours googling the errors that come for it to nail it down to an option in the file to comment out or change, despite the comments in there. It was a warning, and i stand by it.....

 

Also worth mentioning that most of the reasons in the past for using it, i.e.e hardening against things like fingerprinting is now done out of the box ...read the Firefox changelogs and its obvious user.js hacking is becoming less and less needed, and it might be going away altogether.

 

As with a lot of things in IT and reposted across forums everywhere, a lot of the user.js hacking is e-peen, people wanting to look like they know better than the vendor or others....what the people who spout user,js hacks dont bother to tell people is that as mentioned above, out of the box now, most of the reason people did fiddle with this stuff in years gone past is now handled out of the box....and they never tell you how many hours they spent unbreaking their internet after they broke it with user.js hacks, and id be willing to be more than half of those who post user.js hacks actually abandoned their user.js after it broke too many sites, and left their files and comments up because no one like sot backpedal when they got it horribly wrong.....

 

User.js hacking, not recommended for average users, and always backup the profile folder first, because youre going to to want to restore it after you break things, you have been warned

Link to comment
Share on other sites


16 minutes ago, stylemessiah2 said:

Im not exactly a newbie to user,js hacking, i simply stated it breaks way too much out of the box, and my comment stands that the average person will spend hours googling the errors that come for it to nail it down to an option in the file to comment out or change, despite the comments in there. It was a warning, and i stand by it.....

Was bringing the info the same way, on a more the positive side, saying that there are several sources.

In point of fact the above user.js did not break anything here simply because It was only a template that got customized before use.

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...