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