Firefox Configuration Tips Thread

Here are a few tips on configuring Firefox. (Updated: October 2021)

Firefox Container Tabs

This is a feature that isolates the cookies and information between different sets of tabs. So you could have one container tab set where you’re logged into Google which couldn’t read the cookies from your other tabs.

Here is an article on how to set it up:

Firefox Private Network

Mozilla offers a nice VPN inside of Firefox for $2.99/month.

There’s also Mozilla VPN, which covers the entire devices.

uMatrix

uMatrix is the best privacy extension I’ve found for controlling what resources a site can load. It might take 15-30 minutes to figure it out, but it’s worth the time investment. (tutorial)

Below is an example of what the uMatrix panel looks like on a popular news website. The rows are hosts and the columns are types of resources. So you can easily block all resources from a tracking or ad host, or prevent all hosts from running JavaScript. In the top left, you can control the scope of your rules, from the subdomain level (e.g., www.example.com), the domain level (as in the screenshot: example.com), or for all sites (the .com in the domain name). Click on the desired scope before setting your rules.

umatrix

Source code:

uBlock Origin

uBlock Origin is also worth installing. uBlock Origin is made by the same developer as uMatrix.

Firefox for Android is the only mobile browser that allows browser extensions, and uBlock Origin can be installed in it. (Highly recommended.)

Be sure that you’re downloading the recommended “uBlock Origin”, because a few other extensions of unknown quality have similar names.

image

Source code:

Stylus

Stylus lets you override the CSS on web pages. It’s a fork of Stylish that doesn’t contain spyware.

Stylus lets me remove all CSS web animation from the Web. You can also use it to fix sites like Medium which cover up large sections of the page with fixed bars.

Cookie Auto-Delete

This extension deletes cookies from a site when you close its last tab:

Search Preferences

I use these search preferences to separate search results from my history and bookmarks. If you do it like this, ctrl+l will take you to the address bar and ctrl+k will take you to search. You can use TAB in the search box to change search engines.

about:config and user.js

If you type about:config in the address bar, it brings up internal settings that you can override. One of the first things I do is remove URL trimming so that the full URLs always show.

(Most browsers now hide the true URL from users. codeselfstudy.com is not the home page URL, it’s https://codeselfstudy.com/, with the trailing slash. If the trailing slash is missing, the browser is not showing you the true location.)

For example: search for trim at the top and then double click the value on the right to toggle that setting.

I think you can also write your settings file in JavaScript and save them as user.js in your Firefox profile. (Find it quickly with Help > Troubleshooting Information. Press alt to show the top menu, at least on Linux and Windows.)

Below is a sample user.js file that I used with previous versions of Firefox. (Search online for more information, because specific settings might have been updated.) I’m not using user.js at the moment, but it’s another way to manage custom settings.

// Don't connect to remote links on hover
user_pref("network.http.speculative-parallel-limit", 0);

// Don't trim URLs
user_pref("browser.urlbar.trimURLs", false);

// Enable privacy protection
user_pref("privacy.trackingprotection.enabled", true);

// Don't autofill URL bar
user_pref("browser.urlbar.autoFill", false);

// Open new tabs in background
user_pref("browser.search.context.loadInBackground", true);

// Don't show dropdown in URL bar on focus
user_pref("browser.urlbar.openViewOnFocus", false);

// Reduce animation
user_pref("ui.prefersReducedMotion", 1);

Other Interesting Extensions

  • One Tab – send your tabs into a list for later access. This really helps with cleaning up open tabs.
  • First Party Isolation – “First Party Isolation, also known as Cross-Origin Identifier Unlinkability is a concept from the Tor Browser. The idea is to key every source of browser identification with the domain in the URL bar (the first party). This makes all access to identifiers distinct between usage in the website itself and through third-party. Think of it as blocking Third-party cookies, but more exhaustively. Here are Firefox’s implementation details about First Party Isolation
  • HTTPS Everywhere – turns on HTTPS on many sites that support it.
  • Decentraleyes – load CDN scripts locally rather than from CDNs.
  • Skip Redirect – “Some web pages use intermediary pages before redirecting to a final page. This webextension tries to extract the final url from the intermediary url and goes there straight away if successful.”

See also switching to duckduckgo for a way to use duckduckgo by default while still having easy access to Google Search.

Firefox Profiles

You can create multiple Firefox profiles by following these instructions. Each profile will be isolated, including the browser extensions.

On Linux you can type this to launch the Profile Manager to create and manage profiles:

$ firefox -ProfileManager -no-remote &

(I alias that to ff for easy access.)

I also download Firefox Develop Edition to ~/firefox/developer_edition/ and then create a separate alias for it in my shell config file like this.

ffd='~/firefox_developer_edition/firefox/firefox -ProfileManager -no-remote &'

For anyone using Ubuntu, you can launch different Firefox profiles from desktop icons by creating a file called profilename.desktop on your Desktop. Paste the code below into the file, changing <profilename> to the name of your profile.

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=firefox -new-instance -P "<profilename>"
Name=Firefox <profilename>
Comment=Launch Firefox
Icon=/usr/share/icons/HighContrast/48x48/apps/firefox.png

You can do a lot more with Firefox, including changing the browser itself via CSS, and I hope to update this post soon with more tips. In the meantime, don’t forget to dig into the browser preferences, because there are options there for blocking fingerprinting and other useful things.


Update: Firefox started linking the theme choice to dark mode. If you choose a dark theme, dark mode will automatically turn on. To de-link them, use about:config to set layout.css.prefers-color-scheme.content-override to 2. (0 forces dark theme, 1 forces light theme, 2 follows system theme, and 3 follows the Firefox theme.)

I’ve used uBlock origin for years, never heard of uMatrix.
Do you install both uBlock and uMatrix, or is uMatrix enough?

I use both. uBlock Origin has a feature where you can right-click on an element to block it, which is convenient. I also allow it to run in private browser windows so that it blocks a lot of the garbage there. I don’t run uMatrix in private windows, because my main use for private windows is quickly bypassing my strict uMatrix settings.

The screenshot below shows how all new sites are configured by default — the only things that will load are first-party CSS and images. If I think I’ll use a site again, I update the settings and click the padlock to save the settings. If I just need to view a page quickly, I’ll sometimes open it in a private window to bypass uMatrix. (Firefox also comes with a built-in reader mode. Just click the icon to read the page if it doesn’t render well.)

image

Quick browsing shortcuts:

  • open a private window: ctrl-shift-p or cmd-shift-p
  • go to address bar: ctrl-l or cmd-l
  • go to search box:* ctrl-k or cmd-k
  • additional keyboard shortcuts

(* I enable the separate search box in the settings and turn off “Show search suggestions in address bar results” — it gives more control over whether you want to go to a URL or do a search. Google Chrome was designed with one search box in order to send people to Google Search to accidentally click on disguised ads on the way to their destinations, and Firefox unfortunately copied that idea from Chrome, but you can still revert it to two separate boxes in Firefox’s settings.)

One could argue that it’s more time consuming to do it like this, but I’d argue that mindlessly surfing the Web is not healthy, and this breaks a lot of the patterns that companies use to get people addicted to mindlessly clicking around, in addition to significantly reducing risks from the surveillance economy. :slight_smile:

1 Like

Firefox is in the news today.

Baker’s pitch is that only Mozilla is motivated, first and foremost, to make using the web a pleasurable experience. Google’s main priority is to funnel user data into the enormous advertising engine that accounts for most of its revenue. Apple’s motivation is to ensure that customers continue to buy a new iPhone every couple of years and don’t switch to Android.

“Google wants the web to go through Google,” Aral Balkan, the activist and founder of the internet democracy campaign site ind.ie, tweeted earlier this month. “It already mostly does: with eyes on 70% to 80% of the web.”

The company has been accused of using its control of Chrome and of Google search to warp the very fabric of the internet.

I just saw this today.

“To prevent third-party trackers disguised as first-party scripts, uBlock Origin is working on a workaround based on Firefox’s DNS API. This API is not supported on Chromium based browsers.”

The API looks interesting:

A few more Firefox-related links from chat:

This looks useful:

I also discovered uMatrix’s logger. If you open that and leave it in a background tab, it will print interesting information about requests.

I added two more user preferences for about:config to the top post:

To stop the new dropdown from appearing when the URL bar is focused, set browser.urlbar.openViewOnFocus to false.

To reduce animation, create a new setting named ui.prefersReducedMotion and set that to 1.

There’s also a new section in the top post on configuring search preferences.

I updated the top post today, because some things changed in Firefox over the past year.

I added a section to the top post on how to override the dark theme settings in Firefox. It seems like something changed with a recent update.

Edit: actually, it doesn’t seem to work. :thinking:

I’ve moved the text below to use as a reference in case anyone wants to try to figure it out later. I think it doesn’t apply to most users though.

Removed Section

Turn Off or Enable Dark Theme

As of December 2021, it looks like Firefox is telling websites to serve a dark-mode version, if you have set Firefox’s own theme to a dark theme.

To use the dark theme in Firefox, but still show websites with a light theme, type about:config into the address bar. Ignore the warning.

Add a new number key named ui.systemUsesDarkTheme and set the value to 0. Then restart the browser.

Seen here.

If you don’t add that setting, I think it will use your system theme or your Firefox theme to set dark mode on websites. I’m using i3wm on Linux, so there doesn’t appear to be a single setting on the OS that I can switch, but if you’re using Mac or Windows there might be another way.