Code Self Study Forum

Firefox Configuration Tips Thread

Here are a few tips on configuring Firefox. (Updated: November 2019)

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 free VPN inside of Firefox.

(Side note: you can also transfer files up to 2.5 GB for free with Firefox Send.)


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.,, the domain level (as in the screenshot:, or for all sites (the .com in the domain name). Click on the desired scope before setting your rules.


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.


Source code:


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. is not the home page URL, it’s, 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.)

This is a sample user.js file that I used with previous versions of Firefox:

// 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("", 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.)

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]
Exec=firefox -new-instance -P "<profilename>"
Name=Firefox <profilename>
Comment=Launch Firefox

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.

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.)


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, 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.