After a fresh install of Firefox, here are the steps I deem necessary to have a nice and obedient browser:

Addons

Let’s start with the plugins:

The essentials

  • uBlock Origin uBlock Origin to block ads.
  • NoScript NoScript to block javascripts unless whitelisted. After installing it, it takes some days to have your favorite trusted websites whitelisted, but it’s very much worth it. Unless you enjoy executing random code all the time, with 80% of this code written to track you on the web…

The rest

  • Flagfox FlagFox because I like seeing where the server is located. It also comes with some useful tools if you right click the flag in the address bar.
  • Vimium Vimium to add Vim like motions and controls to firefox. This plugin works very well and is very customizable. You can find my config in my .dotfiles repository. The ability to save/load a config file is very nice.

When typing in address bar, look into bookmarks first

If something is bookmarked, it is what I want to access when typing in address bar, not do a search about it. So let’s make sure it shows up first.

In about:config set places.frecency.bookmarkVisitBonus and places.frecency.unvisitedBookmarkBonus to 1000.

Remove the Pocket crap

I don’t use it. And if you don’t, you should disable it too.

In about.config set extensions.pocket.enabled to false.

Don’t accept third party cookies

I never had any issue blocking them, they might be necessary for some types of single-sign-on systems (thanks u/moosingin3space for pointing that out) but I never encountered any issue. Most of them are for tracking users so let’s block’em.

In about:preferences block all third party cookies.

cookies

Disable reporting and studies

Uncheck data collection boxes, along with the studies one. Enable HTTPS-Only on all windows.

Set the home page

My home page is a local html file, found in my .dotfiles repository. It’s pretty simple, it does nothing but allows you to write in it (via the contenteditable attribute). And the background color is the same as the UI.

Prevent the “remove from history” thing from requiring a tab

When typing something in the address bar, there is now (May 2023) a button to remove that entry from history, and by default it is keyboard accessible, which means to switch to the entry below you need to type tab twice instead of once. Disable this behavior with:

browser.urlbar.resultMenu.keyboardAccessible set to false

A sane new tab

I really dislike having my history displayed on a new tab.

In about:config set browser.newtab.preload to false.

Unfortunately it is no longer possible to display a local file (like the home page) :(.

Restore original behavior of Ctrl-Tab and Ctrl-Shift-Tab

I want to be able to go through my tabs with Ctrl-Tab and Ctrl-Shift-Tab to go in the other direction.

In about:config set browser.ctrlTab.recentlyUsedOrder to false.

Old behavior of downloaded files

I don’t want the download window to pop up every time I download a file, this fixes it:

Set browser.download.improvements_to_download_panel to false in about:config.

Also set browser.download.start_downloads_in_tmp_dir to true because now it seems the files are directly downloaded to home when viewed…

Set default folder when uploading a file

By default it’s Desktop, but I don’t have a Desktop folder, so it always creates one which is annoying. Set the default upload folder to something else with:

dom.input.fallbackUploadDir.

Miscellaneous

  • Save downloads in home (I don’t have a Desktop folder anymore)
  • Disable spelling (I deeply hate spelling checks)
  • Disable warn when closing multiple tabs
  • Remove home button frome toolbar
  • Show menu bar and bookmarks toolbar
  • Put the NoScript icone in top left because that’s where the mouse is closer to most often
  • Remove useless search engines and set the default as something else than google (I host my own Searx instance)
  • Set network.trr.exclude-etc-hosts to false so /etc/hosts can be used even with DoH

That’s about it. A lot more settings could be altered but we said the first 5 minutes ;)