How to use Firefox for better privacy protection

There is no doubt that Chrome and other Chromium-based browsers with the Blink kernel are dominating the browser market today because of their speed and web compatibility. But at the same time, Chrome and Chromium are often criticized for privacy issues because they are owned by a company that claims to be “not evil” but is evil in every way. Many who want to escape Chrome’s dominance have turned to the freer Firefox browser, and although its parent company, Mozilla, has had its share of drama in recent years, Firefox is still the only alternative to Chromium’s Blink and Safari’s WebKit.

I used to love Chrome (or rather Chromium), and with ArchLinux as my main system, my experience with Chromium browsers compiled with open source Chromium code from official repositories was basically the same as Google’s official closed-source Chrome at the time. The opportunity to switch to Firefox started a year or so ago when Google restricted the use of its data sync API to third-party browsers, so that Chromium browsers compiled by each distribution lost their account sync capabilities, which caused a lot of discontent at the time. Since then, I’ve been trying to use Firefox as my primary browser instead of Chromium, and eventually eliminated Chromium altogether.

It is no coincidence that Google has announced that it will completely disable the Manifest V2 specification by the end of 2022 (later postponed for half a year), as a replacement for the Manifest V3 specification, in Google’s words, to “protect user privacy”, which restricts many permissions of browser extensions, the most influential of which is the disabling of the WebRequest API, the majority of ad removal Although Google has opened up a new API for extensions to use, the ability of extensions using the new API to block ads will be greatly reduced. On the other hand, Firefox has ensured that its Manifest V3 specification will retain compatibility with the WebRequest API.

I believe there are many people who are interested in Firefox or have switched to Firefox, so I’m writing this article to share what I’ve learned about how to configure and use Firefox in the past year or so.

Download Firefox
Similar to Chrome, Firefox is officially divided into stable, beta, and nightly versions, but unlike Chrome, Firefox also has a long-supported ESR version (which is backward, but will be maintained for a long time) and a Developer Edition for developers (based on beta version, with more developer tools).

In addition, because it is an open source project, Firefox also exists many unofficial fork (forked version), among which the following are worth mentioning.

Tor Browser: The famous Tor browser, based on the ESR version of Firefox, with many advanced settings modified by default to enhance privacy and security, and integrated with Tor network to enhance anonymity, but because of the network environment, almost unavailable in China;

Librewolf: Based on the stable version of Firefox, it removes the code in the original version of Firefox that does not strictly conform to the definition of free software, disables telemetry, data collection and DRM, modifies many advanced settings to enhance privacy and security, and integrates the uBlock Origin extension by default.

Waterfox: based on Firefox ESR, claimed to be privacy-friendly, but sold to an advertising company; and it has a strange version distribution, divided into Classic (based on the super old Firefox ESR 56, but still maintained and updated) and Current (based on the latest ESR version), with version numbers prefixed by G (supposedly For example, G5 corresponds to Firefox ESR 102, G4 corresponds to Firefox ESR 91, and G3 corresponds to Firefox ESR 78.

With so many versions available, which one should I choose? My personal advice is: if you are a privacy freak and want the highest level of privacy protection, I recommend Tor Browser and Librewolf, and you can skip the configuration section below, because these two browsers already provide the best protection settings, but both of these people generally don’t need a tutorial like mine.

For the average person who wants to have a normal web browsing experience, I still recommend using the official version of Firefox.

However, it’s worth mentioning that one of Mozilla’s tricks is that Firefox installers downloaded directly from the official website contain a unique identifier that can be used to track users, so if you mind, you can download the installer from Mozilla’s FTP site.

For Linux users, since Firefox exists in the official software repositories of almost all distributions, and is even pre-installed on most distributions, you can use the package manager to quickly install it if you don’t have it pre-installed, and in addition to the software itself, you also need to install the corresponding language package.

Recommended Configuration

Backup configuration file
First of all, the most important data security, in the Firefox address bar enter about:profiles and then enter, you can see the interface below, under normal circumstances there is only one configuration file, if not renamed, the name of the configuration file is default, while there will be two folders, usually a string of garbled plus configuration file name. The first folder stores various data of the browser, which is more important, while the second folder stores the cache files, which can be ignored. You can open the folder in the file manager by clicking “Open Directory” next to it. What we need to do is to copy the first folder elsewhere. If you accidentally break your browser and don’t know how to restore it, just delete the configuration folder and copy back the configuration folder you backed up before, then you can restore it to its previous state.

Alternatively, you can create a new configuration folder by clicking “Create New Profile” above and set it as the default profile. This way, the next time you open Firefox, the new profile will be read by default and will not affect the old one.

Personalized settings
Everyone has different preferences for appearance, so I’ll just share my personal configuration here for reference only.

First of all, the theme color, in the latest Firefox 106 version, the new Colorways theme color is added, which will be recommended in the wizard screen that pops up when you start the browser for the first time.

You can also click the logo in the top left corner of your browser to enter the Firefox view interface or type about:addons in the address bar to enter the extension management page to modify the Colorways color scheme, and Firefox also has several built-in theme colors, so you can download more themes through the Firefox extension store. I personally use Dracula Dark Theme.

Then is the browser page layout, the mouse in the browser tab bar blank right click, in the context menu click “customize toolbar”, you can enter the custom Firefox interface, toolbar elements do not want, just use the mouse to drag it to the middle area, relatively, want to add the elements also just need to drag the mouse to the desired location, modified click the bottom right corner of the finish can be. I personally used to remove the blank space on both sides of the address bar, add a home button in the upper left corner, put the unused extensions into the collapse menu, and the aforementioned Firefox view, this feature is newly added in version 106 to facilitate multi-device synchronization, but the default in the upper left corner feels very uncoordinated, so I moved it to the upper right corner.

The last is the home page content, enter about:preferences in the address bar to enter the settings page, click home page on the left side, uncheck all parts of the Firefox home page content section except web search, so that the browser is a fresh home page to open.

Privacy settings
Although Firefox is often touted as a privacy protection, the official version of Firefox is not much better than its competitor Chrome without any settings, with the same telemetry and data collection. But the advantage of Firefox is that it has more configurable options and telemetry and data collection can be turned off by certain means. This section will go over some basic privacy-related settings, but how you configure them depends on your usage scenario.

Under “Settings” > “General”, find “Content with Digital Rights Management (DRM)”: Some audio and video sites, such as Spotify and Netflix, may provide content with copyright protection and digital encryption (EME), so if you want to play such content, you need to install the Widevine plugin. Widevine plugin can be installed automatically. But the problem is that DRM is against the idea of open source freedom, if you don’t mind this, you can turn off this option.

Enable HTTPS-based DNS: When enabled, all DNS queries will be handled by DNS-over-HTTPS providers, and no query results will be leaked to local operators. Note that DNS-over-HTTPS is significantly slower than normal DNS and may slow down web page loading when enabled.

If you want to add other search engines, you can install them as extensions from the official extensions store or add them in the right-click address bar of the search engine URL.

“Search Suggestions”: It is recommended to turn it off because search suggestions are provided by search engines and may be used to collect private information.

“Settings > Privacy & Security, find Enhanced privacy protection, the default standard mode will not block tracking content in normal windows, here we recommend to choose Strict, although Firefox will prompt you “may cause some websites to be abnormal”, but I basically have not encountered it, if you really encounter website abnormalities, you can also add exceptions.

“Do Not Track signal to websites to indicate that you do not want to be tracked”: we recommend “Send All”, websites that follow this setting will stop tracking user information, but not all websites will follow this setting, but it’s better than nothing.

“Cookie and website data”: If you don’t want your browser to save cookies and website data, you can check “Delete cookies and website data when closing Firefox”, and then configure the websites you don’t want to be deleted in “Manage exceptions”, but I personally find this management exception difficult to use, the URL doesn’t support wildcard, I prefer to use Cookie Auto I prefer to use the Cookie Auto Delete extension, see the extension recommendations section below.

“Login Information and Password” and “Forms and AutoFill”: I personally use a separate password manager, so this is all turned off, but if you want to manage your password with Firefox, you can turn it on.

“History”: If you are worried about the leakage of browsing history after your computer is stolen, you can choose not to record the history, I personally think it is quite convenient to record the history.
“Firefox data collection and use”: it is recommended that all unchecked, needless to say.

“Fraudulent Content and Dangerous Software Protection”: It may be a bit counter-intuitive, if you want to protect your privacy, it is recommended to turn this off, because “Dangerous and Fraudulent Content” is submitted to Google for identification. I guess privacy and security don’t go hand in hand here.

“Query OCSP response server to check if the certificate is valid”: It is recommended to turn on to check if the SSL certificate is valid and increase security, but if the network environment is poor and the OCSP server connection is unstable, it may slow down the loading speed of web pages, or even prevent them from loading.

“HTTPS-Only mode”: It is recommended to turn it on. Nowadays, most websites have already supported HTTPS, after turning it on, you can upgrade the unencrypted and insecure HTTP to the more secure HTTPS, and for the few websites that do not support HTTPS, you can manually return the HTTP.

If you’ve read this far and followed my settings step by step, your browser is already more private and secure than most people’s browsers, with as little impact on the basic web browsing experience as possible. If you are satisfied at this point, you can simply exit this article; if you want a higher level of privacy protection and are prepared for the impact on your web browsing experience, then read on.

Deeper into advanced settings
Type about:config in Firefox’s address bar and enter, a warning page will pop up, click accept risk and continue, then you can enter the advanced settings.

For example, if I want to disable the about:config warning page, I can type browser.aboutConfig.showWarning in the search box, there is only one result, click the right arrow, true becomes false. reopen about:config again, you will find that the warning page is gone.

Let’s call back browser.aboutConfig.showWarning to true for now, which means that the alert page is not disabled. Remember the configuration file directory mentioned earlier? Type about:profiles in the address bar to find the current configuration file directory, open it, and create a new text document in it with the following content.

user_pref(“browser.aboutConfig.showWarning”, false);
Rename the document to user.js, then restart the browser and enter the about:config interface again, you will find that the warning interface is gone again, search for browser.aboutConfig.showWarning and find that its value has become false again.

At this point, you already have a certain understanding of Firefox’s advanced settings, Firefox’s advanced settings can be set either in the about:config interface or with the user.js file, you can then make changes to Firefox’s advanced options according to your needs.

Arkenfox

At this point you may ask: about:config There are so many configurations inside, how do I know which one to change? How do I change it? As it turns out, you should never reinvent the wheel, and there is a project on GitHub called Arkenfox, which is an actively maintained user.js list designed to enhance Firefox’s privacy and security by disabling most telemetry items and modifying many privacy-related settings. .js file provided by the project, put it in the configuration folder, restart the browser, and you’re done.

Modifying these advanced options will most likely result in a web page failure, so it is recommended to install an alternate browser, or create a new configuration file in the about:profiles interface.

user-overrides.js
At this point you may ask, “This user.js configuration can’t be suitable for everyone, what if I need to change it? If the Arkenfox configuration changes in the future, how can we update it with the project?

The maintainers of Arkenfox have thought of this, and do not recommend modifying the user.js file directly for configuration items that you want to modify yourself. Save the configuration items that need to be changed into text, rename them to user-overrides.js, put them into the configuration folder together with the updater script, run the script, and it will automatically download the latest user.js, merge it with user-overrides.js, and save it as a new user.js file. In the future, if user-overrides.js is changed or if you want to update Arkenfox, just run the updater script again.

In addition, Arkenfox provides the perfsCleaner.sh and perfsCleaner.bat scripts, which are recommended to be run before updating Arkenfox and which will reset all configuration items to prevent metaphysical problems.

You can learn about common overrides here and here, here are the overrides I recommend to change.

The browser startup page modification: 0 for a blank page, 1 for the main page, 2 for the last viewed page, 3 to restore the previous view. arkenfox is modified to 0, I personally modify it to 1.

user_pref("browser.startup.page", 1);

Browser homepage modification: Arkenfox modified to about:blank blank page, I personally modified to about:home.

user_pref("browser.startup.homepage", "about:home");

New tab page modification: Arkenfox modified to a blank page, I personally modified back to the default home page.

user_pref("browser.newtabpage.enabled", true);

Recommended extensions

Most of the problems can be avoided by modifying the above parameters, but for a more comfortable browsing experience, it is also recommended to install some extensions.

If privacy is more important, you should follow the principle of minimum installation of extensions, only install the extensions you need, and try not to install extra extensions, because the more extensions you install, the easier it is to establish a recognizable fingerprint.

uBlock Origin: According to the developers of uBlock Origin, this extension is not an ad blocking extension, but an efficient request filtering tool that just happens to work as an ad filter. However, if you want to recommend ad removal extensions for Firefox, uBlock Origin is the first one, as it supports more filtering rules than other ad removal extensions and takes up very few resources.

uBlock Origin already has a lot of built-in ad removal rules that you can check according to your needs. In addition to the default enabled rules, I personally recommend.

Check AdGuard Tracking Protection and AdGuard URL Tracking Protection in the “Privacy” category; these two rules provide a number of privacy-enhancing filters.
EasyList China and CJX’s Annoyance List: two rules for the Chinese Internet environment.
Actually Legitimate URL Shortener Tool: This rule can remove some useless tracking content from URLs, somewhat similar to the function of the ClearURLs extension, so the ClearURLs extension does not need to be installed separately.

It is also worth mentioning that due to complaints from some advertisers, some of the ad-removing extensions in the Firefox extension store are no longer installable in the domestic network environment, and the extension store homepage is not accessible, please find your own way, for example, some Linux distribution users can use the system package manager to install from the software source, for example, Archlinux can use pacman -S firefox-uBlock-origin command to install the uBlock Origin extension for the official version of Firefox.

CanvasBlocker: If you have disabled the blocking of fingerprint recognition in user-overrides.js, you can install this extension as an alternative, after installation seems to be no extra settings, this extension provides some fingerprint protection measures, although the protection effect is not as good as the browser’s native blocking of fingerprint recognition, but the impact on the site is much smaller.

Cookie AutoDelete: as the name suggests, automatically delete cookies, after installation in the extension settings page check the auto-cleanup, do not want to clean up the site in the expression list to add a whitelist, this extension compared to the browser comes with the auto-cleanup function, the advantage is that the whitelist supports wildcards, such as want to all subdomains of google.com For example, if you want to add a whitelist for all subdomains of google.com, just add a *.google.com line.

Skip Redirect: Automatic link redirection, some websites will go through some intermediate pages when clicking off-site links, sometimes they need to confirm manually, sometimes they even block links they consider “dangerous”, this extension can solve this problem, jump directly to the final page, save a lot of trouble.

About Firefox Mobile

I haven’t used Firefox for iOS, so I won’t comment on it; and the browser for iOS is basically a shell of Safari because Apple requires the use of the WebKit kernel, so there’s not much point in getting hung up on which browser to choose. The main discussion here is about the Android version.

The Android version of Firefox has been criticized by many people, and there are indeed many problems, such as the lack of features, the official version of Firefox Android can not access about:config interface to modify advanced options, extension installation is also restricted. But compared to Firefox, I personally think Chrome for Android is more difficult to use and does not support extensions at all.

Although Firefox for Android supports the installation of extensions, it can only install a small number of official extensions, so what if you want to install extensions other than those listed? Actually, there is a way to do it. The Nightly version of Firefox for Android provides a way to install additional extensions, but it’s a bit tricky.

First, visit the Firefox extension store on your computer, log in to your account, mouse over your nickname in the upper right corner, click “View my favorites”, create a new one if you don’t have one, click into your favorites, and copy the URL of the web page, which will be used later.

Go back to the home page, search for your favorite extensions, scroll to the bottom and choose to add them to the collection you just created.

Come to the Android side, open Firefox nightly, open settings, find “About Firefox” at the bottom, click it, click Firefox logo several times until “Debug menu is enabled”.

When you go back to the settings page, you will find a “Custom Add-ons Collection” under “Add-ons”, tap it, and you will be prompted to enter your user ID and collection name and the URL of the collection you copied before.

For example, if it’s https://addons.mozilla.org/zh-CN/firefox/collections/123456789/name (just an analogy, not a real link), then the user ID is 123456789 and the collection name is name.

After filling it out, save and restart the application, tap on the Add-ons page, wait for it to refresh and you will find that the extension you want to install is already in the list. But the extension may not work properly after installation, please test it yourself.

But even with the Nightly version of Firefox, there is no way to get to the about:config page. This brings us to the third-party Fork versions.

The first one is Iceraven, built on the Firefox Android open source fenix, you can download the installer from Github release, it integrates a large list of extensions by default, most of the commonly used extensions can be found, save yourself the trouble of adding a collection, and you can also access about:config to modify advanced options. However, the maintainer of Iceraven is not very active in updating the version, and often lags a lot behind the official version.

Fennec F-Droid is a browser built by F-Droid store based on Fenix code, the update progress is basically the same as the official one, maybe a little bit behind. It is worth mentioning that, for some reason, after installing Fennec extensions, the default settings page of the extensions are in English, some extensions can modify the language in their own settings page, such as Tampermonkey, some can not be changed.

Although Iceraven and Fennec can modify the advanced settings through about:config, Arkenfox modified hundreds of options, according to the user.js on the small screen one by one is very difficult to modify, there is no better way it?

This browser is based on Fennec mentioned above, but it has integrated Arkenfox’s advanced settings by default, so the few options that need to be overridden can be modified by yourself, saving a lot of trouble.

However, it’s worth mentioning that, like Arkenfox, Mull has the option to block fingerprint recognition by default, which locks the interface refresh rate at 60Hz when enabled on mobile, a known bug that can be turned off if you’re using a high-brush phone and don’t mind it. I also found that the Violentmonkey extension does not work properly on Mull, but Tampermonkey does, both extensions work fine on Fennec, I don’t know what the reason is.

The above is basically my experience of using Firefox, in fact, there are some that I have not talked about, such as modifying the appearance of Firefox through custom CSS files, I have not studied in depth, so I will not go into details.

FYI: If you want to completely uninstall these browsers mentions above for better privacy protection, it is recommended to use the best app uninstaller UninstallService on Windows & Mac, and AppUninstaller.com’s App Uninstaller for the best Mac app removal.

Leave a comment