Firefox privacy and custom settings made easy

Change Firefox privacy settings with user.js

Firefox is a fast and customizable web browser. And with the latest version called Firefox Quantum (version 57), it is faster than ever! It is great to load websites fast, but there’s another amazing feature. Changing the Firefox privacy settings to be more effective at making user tracking more difficult.

You are hopefully already using a content blocking add-on like uBlock Origin, to help eliminate things you don’t want to see (like maybe one or two ads), and also for your online safety. Customizing Firefox privacy settings is the next step.

To do this, normally you open a new tab, and type in “about:config”. Then you get tons of different settings to modify.

You can end up changing a lot of settings, all manually. But it can be easier, if you know how to save all your settings into a configuration file. And this works cross-platform (on Windows, Mac, Linux) as well.

The Problem

Nobody wants to manually type all these changes into Firefox. Especially in multiple places, like in your Firefox browser on your home computer, and your Firefox browser on your work computer.

What settings to change?

I keep mentioning changing settings, but what settings should you change? That’s a very good question. I’ll group the changes into two categories: Privacy and Usability. If you already know what you are doing, jump ahead to making the changes. If not, read on.

Firefox Privacy related changes

For some insights into what to change to be more secure, I recommend starting with privacytools.io. They have a helpful section for Firefox privacy settings. The entire website is good actually.
Another good resource is Firefox Profilemaker.
Keep in mind you should test after making a change, since websites can stop working!

I also have a list of changes that I use available on GitHub. However, some changes might not work on the websites you use. So again, be sure to test. And take some time to understand what you are changing.

Firefox Usability changes

These changes are mainly to improve Firefox with my own personal preferences.

The biggest change for me was the tab sizes. I keep many tabs open (yes, probably way too many). And with Firefox 57, I find the tab width gets too small with many tabs open.

/* Fix tab width too small */
user_pref("browser.tabs.tabMinWidth", 100);

/* Change homepage */
user_pref("browser.startup.homepage", "https://startpage.com/");

/* Increase disk write timer to prevent SSD from dying
 * Source: https://www.servethehome.com/firefox-is-eating-your-ssd-here-is-how-to-fix-it/
 */
user_pref("browser.sessionstore.interval", 120000);

/* Turn off Smooth Scroll */
user_pref("general.smoothScroll", false);

/* Turn off warning on about:config */
user_pref("general.warnOnAboutConfig", false);

/* disable onboarding junk */
user_pref("browser.onboarding.enabled", false);

How to automatically change Firefox settings

Here are the steps to make all the configuration changes in Firefox. And without having to use “about:config”. Put all desired changes into a configuration file and then Firefox reads from this file when it starts.

Here are the steps:

  1. Put all of your configuration changes into a file named: user.js
  2. Open your profile directory, which you can find in “about:support” or “about:profiles”
  3. Save this file into your profile directory
  4. Restart Firefox. This overrides the previous settings with the user.js file when Firefox starts
  5. Optional: Rename user.js file to something like user-unused.js

Renaming user.js  will make sure not to override the settings again, in case you do make the changes in “about:config”. However, it could be good to keep this file in place in case Mozilla gets any ideas about changing your default search engine without asking you (if you have that in user.js of course). Not that Mozilla would ever do something like that..

Conclusion

To summarize, now you have put all your Firefox privacy and usability settings into your user.js file. You can now copy this file to your other Firefox profiles, on your other computers, and automatically have the same settings loaded into Firefox. As an added bonus, you have now made user tracking more difficult.

Have a question? Contact me.

Leave a Reply

Your email address will not be published. Required fields are marked *