Friday, May 14, 2021

Optimizing Firefox for a weak PC

This blogpost was first written as a reply on reddit.
This post applies to Firefox Quantum — v.57, v.60esr, v.68esr, v.78esr, and newer)

Instead of Lubuntu, consider BunsenLabs, which is based on Debian. BunsenLabs will run in a computer with 1 gigabyte of RAM, probably with plenty of swapping, so you'll still need at least 2 Gb of RAM. BunsenLabs LiveCD's actual commit after boot is ~200 Mb, which is equivalent to Windows XP SP3.

BunsenLabs is one of the few distros that offers a live CD (yes, a CD image), but the LiveCD edition is meant only for 32-bit systems.

As for Firefox, then off the top of my head:

In Settings:
  • Disable "Check spelling as you type"
Under Performance:
  • uncheck Use recommended settings;
  • Play with "user hardware acceleretion"
  • Set the Content process limit to 1
Under Browsing:
  • Disable smooth scrolling
  • Disable "recommend extensions as you browse"
  • Disable "recommend features as you browse"
Under Search:
  • Disable search suggestions
  • Uncheck the search engines that you do not use
  • Under Privacy & Security > Permissions:
    In Settings for Autoplay (new window), set the default for all sites to block audio and video. Use Ctrl+I, and in the Page Info window under the Permissions tab list for a domain, to allow audio/video on YouTube, for example.
Uncheck all under Firefox Data Collection. In about:config, set:
  • browser.sessionhistory.max_entries to 25 (from 50)
  • browser.sessionhistory.max_total_viewers to 0 (from -1)
  • browser.sessionstore.max_tabs_undo to 5, 7, or 10 (from 25)
     
  • browser.sessionstore.interval from 15000 *to* something greater
  • extensions.update.interval from 86400 *to* something greater
  • media.peerconnection.enabled to false
  • media.peerconnection.video.enabled to false
Extensions:
  • Install the NoScript extension, as it uses a whitelist (with some built-in entries). Set it to display full domains in settings. You'll have to permit certain domains from the NoScript pop-up menu to make a site work.
  • Install uBlock Origin or Adblock Plus to block ads. While NoScript blocks most of the harmful cruft, one of the two adblockers won't let video ads pass through.