Configure Firefox

Similar to Thunderbird, it has been decades since I’ve set up Firefox for the first time. Again, similar to Thunderbird, I copied the old configuration between Windows and Linux machines.

Config editor

Similarly to Thunderbird: avoid if possible, prefer the UI.

Wizard

Do not import anything, do not install recommended extensions, and do not use an online account.

Open previous Windows and Tabs

As the option says, open previous windows and tabs. I tend to close the programs I am not currently using, and to shut my devices off when I do not use them, instead of putting them in standby.

Check if Firefox is your default browser

Not really necessary, but on Windows, it happened more than once that some update reset the default browser. Thus, it should not hurt to enable this setting if you want to use Firefox as your default browser.

Vertical Tabs

Compared to horizontal tabs, they have the advantage that they have a fixed width. So even when you have a lot of tabs, it is still possible to recognize them and read the titles.

And grouping, at least for me, works for me more effectively, for the same reasons.

Prefer dark theme

Unfortunately, not all sites support or respect that setting.

Set Website appearance to "Dark", and Contrast Control to "Automatic (use system settings)".

I currently use the Dark Reader addon to force every website to use dark mode.

I would vastly prefer such a setting to be integrated into Firefox, but as it is not the case, I need something else.

I thought about using a bookmarklet, but I want most sites to be dark by default; having to execute a bookmarklet manually means I get blinded by a white website in too many instances.

By the way, if you want to improve support for dark pages and printing; it can be done easily by querying the media types ๐Ÿ—„๏ธ, like print (@media print), and if the users prefer a light or dark theme, for example with @media (prefers-color-scheme: light):

@media not print{
  /* settings that are not applied when printing a document */

  /* example: background color */

  @media (prefers-color-scheme: light) {
    /* set a light color as background */
  }
  @media (prefers-color-scheme: dark) {
    /* set a dark color as background */
  }
}

@media print{
  /* settings applied when printing a document */

  /* example 1: print where a link points to */
  a::after {content: " [" attr(href) "]";}

  /* example 2: do not use a different color for visited links */
  a:visited {color: LinkText;}
}

Langauages

99% of things I read on the web are in English.

It is possible to set up a list of multiple languages. I’m not sure if that ever had any upside; I suppose that one of the downsides is that it makes me easier to track, as the languages are sent to the server as an HTTP request.

Blank page as default for Home and New Tabs

No need to connect somewhere and download some unnecessary data.

In Firefox home content (the default page for new windows and tabs), I also disable everything: web search, recent activity, and shortcuts. The main reason is that I do not use those; there is already the search bar, history, and bookmarks offering the same functionalities on all pages.

Search settings

Set the default search engine you prefer; unfortunately, it does not seem to be possible (or at least easy) to change the predefined search engines.

I also disable searching from the URL bar, and either use the search bar or use a keyword.

The search bar can be enabled by customizing the toolbar, but there is no graphical setting for disabling the search from the URL bar.

Here is the relevant about:config setting:

keyword.enabled    false

The main reason is that I want predictable behavior. I want the browser to tell me that it could not find a website (either because it does not exist anymore, or because I made a typo) instead of sending the URL to a search engine and showing me some results. And sometimes I want to use a valid URL as a search query, and not to open the URL directly.

Using a separate URL and search bar makes the behaviour more predictable, instead of giving the browser the task to guess if I wrote something to search or open.

Passwords

I leave the settings "Ask to save passwords" enabled, but I prefer to use an external password manager.

The main reason I keep it enabled is that sometimes an external password manager does not integrate well with some websites. For example, pages that use .htaccess for securing the content trigger a Firefox dialog, instead of a dialog in an HTML page, and so cannot inject the desired functionality.

The password manager I’m using is KeePassXC. There is also an addon, on Debian-based systems, I prefer to install the extension as a system package (webext-keepassxc-browser), so that it is available by default for all instances, and is updated together with other programs.

The main advantage of an external password manager is that it makes backups trivial (just copy the KeePassXC database), and that passwords do not need to be synchronized between browsers, mail clients, and other programs.

Content manager

There are multiple content managers; uBlock Origin, uMatrix, NoScript

What I am currently using is uBlock Origin.

Although the FBI wrote that an "an ad blocking extension when performing internet searches" ๐Ÿ—„๏ธ should be preferred for avoiding malicious ads, a content blocker (as uBlock Origin describes itself) is much more than that.

I wish that instead of relying on addons with access to all browsed pages, one could use the built-in functionalities of the browser, but as of today, it’s not the case.

JavaScript

The first thing that all those tools have in common is the ability to disable the execution of JavaScript. Granted, some websites break badly without JavaScript, but others work better (faster to load, less dynamic and distracting content, …​), and in all cases, the security is improved, as no unverified and unknown code is executed. For this reason, it is good to be able to set up which websites can execute JavaScript and which not, because of fatigue, one would simply allow JavaScript to be executed on all pages.

Multimedia

A nice feature of uBlock Origin (which might also be available on other content managers) is the ability to disable prefetching, or automatically downloading media elements above a user-specified threshold.

This is an indispensable feature when working on a metered connection, where you pay depending on how much data you download, or when the connection is slow or unstable.

Another useful feature is to disable autoplay; the number of times I want to start a video automatically when I open a page is more or less 0. In this case, Firefox has even a per-site setting, no need to use an extension for that.

Web Fonts

Another feature of uBlock Origin is being able to block web fonts. Granted, Firefox can do it without addons, but it is a global switch that applies to all websites.

There is no way to block or allow webfonts on a set of pages.

There are multiple reasons to disallow web fonts: security ๐Ÿ—„๏ธ, privacy, bandwidth, and consistency.

I’ve experienced at least a couple of times that a webpage did not load correctly and hung up. Thanks to the integrated network inspector of Firefox, I could see that the browser was fetching some remote fonts on a CDN, and for whatever reason, the response did not come. Simply not using web fonts fixes the issue.

Removing other elements

Sometimes I want to remove elements from a website, especially when I want to save a copy.

I do the same thing when storing article journals; I cut the parts I’m interested in: the article.

I also use this zapping functionality, for example, on websites that insert gigantic headers that occupy half of the screen, useless hero images that have nothing to do with the content, distracting side panes, and so on.

Save webpage locally

Making a local copy of a website is a recurring topic for me.

Firefox offers a couple of ways to download a webpage.

The first is with the print functionality, Ctrl+P, but then the webpage is saved as a PDF, and depending on the website itself, it might look completely different.

A better approach is to use the "save as" functionality, which creates a local HTML file and a directory containing images, JavaScript files, CSS files, and so on. Unfortunately, this is not good enough most of the time. Multiple files are difficult to handle, plus you often want to strip the JavaScript and have a static file, as in the case of the PDF file.

Formats like MHTML ๐Ÿ—„๏ธ, MAFF ๐Ÿ—„๏ธ and webarchive ๐Ÿ—„๏ธ are still not supported by all browsers.

The approach I currently use is to create a self-contained HTML file, with inline images, CSS, and no JavaScript, with the help of the SingleFile addon.

There is also a command-line tool, but as of today, I’ve always used the Firefox addon, as I normally want to see what I am storing, especially since I might want to clean up the page.

Bookmarks

I do not use bookmarks as intended that often.

One issue is that often pages change or die.

I see that it is possible to use SingleFile to automatically save a page when creating a bookmark; it is something that I should try out.

What I currently use are bookmarklets. For them, I have the bookmarks menu always visible, so that I can access the most used bookmarklets immediately.

They give me the possibility to extract links, get the RSS feed link, enable copy, archive, or view a page on Internet Archive, and trigger other actions with just one click.

Profiles

Firefox has supported profiles since the beginning. firefox -P starts the profile manager, otherwise type about:profiles in the URL bar of the current instance of Firefox.

I do not use profiles a lot. Normally, I prefer to use a single instance and containers, but there is a group of sites that I do not visit often, and it makes sense for me to open them either way in a separate window.

Containers

Containers are, in my opinion, completely undersold and should be used way more often.

They are more lightweight and better integrated than profiles.

A typical example of how to use a container is given by the addon facebook-container:

What does it do? Facebook Container works by isolating your Facebook identity into a separate container that makes it harder for Facebook to track your visits to other websites with third-party cookies.

How does it work?

[…​]

The next time you navigate to Facebook, it will load in a new blue colored browser tab (the โ€œContainerโ€). You can log in and use Facebook normally when in the Facebook Container. If you click on a non-Facebook link or navigate to a non-Facebook website in the URL bar, these pages will load outside of the container. Clicking Facebook Share buttons on other browser tabs will load them within the Facebook Container. You should know that using these buttons passes information to Facebook about the website that you shared from.

I use Multi-Account Containers mainly for websites I log into. Sometimes I want to visit the website while I’m logged in, and sometimes not. Instead of logging in and out every time, I simply choose to open the website in its dedicated container, or not.

And sometimes I have more than one account.

It is possible to achieve something similar with profiles, but it has some drawbacks:

  • it is not possible to open a link in a different profile, without copying and pasting it manually

  • different profiles are completely unrelated; no shared history, addon, or setting. Often, I want to work in the same environment

  • as profiles are completely separated, they use separate browser instances, which means higher resource usage

Conclusion

This was a high-level overview of what I should configure when setting up Firefox.

Other browsers, mostly Chromium-based, might have similar settings and addons.


If you have questions, comments, or found typos, the notes are not clear, or there are some errors; then just contact me.