Firefox: optimize its settings


Back to the home page


With a couple of changes in the settings, you can improve the performance of Firefox in Linux Mint. These tweaks will make this fine web browser leaner and cleaner.


Contents of this page:


Menu bar visible in Firefox

1. Unfortunately, the menu bar of Firefox isn't visible by default. Very annoying, but this is how you can fix that:

Firefox menu button (with the three horizontal dashes on it, top right) - Customize... - bottom left: click on the button Toolbars - click on: Menu Bar

Make Firefox cleanse itself automatically upon quitting

2. Improve your privacy: you can configure Firefox to cleanse itself automatically, upon quitting. All cookies and history are being deleted then. Furthermore, you can limit the tracking that some websites do to follow you.

The price you pay is a small decrease in user friendliness, but it's not much. The privacy gain is huge, and outweighs this price by far.

You can do it like this:

Firefox menu button (with the three horizontal dashes on it) - Preferences - tab Privacy & Security

a. Item History: change the setting to:
Firefox will: Use custom settings for history

b. Now tick the following setting:
Clear history when Firefox closes

c. Then, click the button Settings... (on the right of "Clear history when Firefox closes") and tick everything, except for Site Preferences. Click OK.

d. Item Cookies and Site Data:

Change the "Accept cookies (...)" setting to:
Keep until: Firefox is closed

e. Item Address Bar: remove the tick for: Browsing history

f. Item Tracking protection: leave those settings at their defaults, because otherwise some websites might function less well.

You've just set all cookies to be thrown away automatically upon closing Firefox (in the previous steps), so this tracking doesn't impact your privacy by much anyway!

g. Close the Preferences tab and you're done with optimizing the settings for privacy.

Tip: sometimes it may come in handy to force a cleansing during your web browsing. Simply by closing Firefox and launching it anew.

Limit the storage

3. By default, Firefox can store far too many files. Limit it like this:

a. Type in the URL bar of Firefox:

about:config

Press Enter.

b. Now you're being presented with a warning. Ignore it and click on the blue button "I accept the risk!".

c. Type as search term: cache

d. Double-click on browser.cache.disk.smart_size.enabled which is currently set to the boolean value true, so that it changes into false.

e. Then double-click on browser.cache.disk.capacity and change the value into 102400.

By doing that you've set the storage maximum to 100 MB, which is more than enough.

Note (1): Leave the other cache settings as they are: usually, the less invasive a hack is, the better. Because this reduces the risk of unexpected unwanted side effects.

Note (2): this is a user preference. Repeat this hack in each user account.

Disable spam by Web Push notifications

4. Firefox contains a true "feature from hell" by default: Web Push notifications. These allow Firefox to deliver on-screen notifications from websites, even when those sites aren’t loaded. Time for some sarcasm: now what on earth could possibly go wrong with that?

A website should ask for permission to do this abomination. But even then, it's simply too easy to allow a website this misbehaviour. A mere wrong click and you could be in for a lot of notification spam....

So I advise to disable this horrible thing fully and permanently for all websites, like this:

a. Type in the URL bar of Firefox:

about:config

Press Enter.

b. Now you're being presented with a warning. Ignore it and click on the blue button "I accept the risk!".

c. Type as search term: webnotif

d. Double-click on dom.webnotifications.enabled which is currently set to the boolean value true, so that it changes into false.

Note (1): Leave the other webnotification settings as they are: usually, the less invasive a hack is, the better. Because this reduces the risk of unexpected unwanted side effects.

Note (2): this is a user preference. Repeat this hack in each user account.

Disable the memory of the URL bar

5. The memory of the URL bar is more aggravating than useful, when you want to type a website address directly. An irritating busybody: "Maybe you want to type this?". Thank heaven you can disable this annoyance like this:

a. Type in the URL bar of Firefox:

about:config

Press Enter.

b. Now you're being presented with a warning. Ignore it and click on the blue button "I accept the risk!".

Type in as search term: maxrich

c. Double-click on browser.urlbar.maxRichResults and change the value to 0.

d. Click on OK.

Note (1): Leave the other maxRichResults settings as they are: usually, the less invasive a hack is, the better. Because this reduces the risk of unexpected unwanted side effects.

Note (2): this is a user preference. Repeat this hack in each user account.

Some graphics cards: disable hardware acceleration in Firefox

6. A few video cards have trouble because of the hardware acceleration that's on by default in Firefox. On most hardware, this browser feature is useful and boosts performance.

However, when you experience graphics problems in Firefox (delay when typing text, problems with displaying video's), try if it helps when you disable it as follows:

Click on the button with three horizontal dashes in the top right corner - Preferences

Tab General: remove the tick for: Use recommended performance settings and then remove it for: Use hardware acceleration when available

Close Firefox and launch it again.

Add-ons and extensions: don't turn Firefox into a Christmas tree

7. You can install a lot of add-ons (extensions) in Firefox. Some of those add-ons can be very useful.

But they have a couple of important disadvantages, because they are "applications within an application":

- they slow Firefox down, especially if there are a lot of them;
- they can cause malfunctions; both in each other and in Firefox itself;
- it has occurred: add-ons with malicious content. Don't trust them blindly.

So don't turn Firefox into a Christmas tree: don't adorn Firefox with lots of add-ons. Limit yourself to only a few add-ons, that are really important for you.

Strictly speaking, extensions and add-ons pollute the clean code of your browser. It's wise to keep the level of pollution down to an absolute minimum.

Note: watch out especially for add-ons that claim to make Firefox faster! Often they do more harm than good. Do not install them: even if one or two of them can really make Firefox run noticeably faster, they may damage the stability of your browser.

Test Firefox with a clean slate

7.1. For troubleshooting purposes it can be useful to test Firefox with a clean slate. So with a default profile and with no other add-ons and extensions than the default ones.

You can do that as follows:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Now disable your current Firefox profile by renaming it. For that, copy/paste the following line into the terminal:

mv -v ~/.mozilla ~/.mozillabackup

Press Enter.

c. Then make sure that the default Firefox profile is present in your user folder. For that, copy/paste the following line into the terminal:

cp -v -r /etc/skel/.mozilla ~/.mozilla

Press Enter.

d. Close Firefox and launch it again. It should have a clean slate now.

e. Do your testing.

When you're done, you can restore the old profile like this:

f. First remove the newly created profile folder, with this terminal command (use copy/paste):
rm -v -r ~/.mozilla

g. Then restore the old profile with this terminal command (use copy/paste):
mv -v ~/.mozillabackup ~/.mozilla

h. Close Firefox and launch it again. All should be as it was before.


Run Firefox from within a secure sandbox

8. You can increase the security of Firefox greatly, when you run it from within a secure sandbox. This neat solution causes almost no loss of user-friendliness and only causes a little extra system load, while making Firefox much more secure.

You can achieve that by applying this how-to.

Enable rendering of DRM content

9. Digital Rights Management (DRM) is a nasty phenomenon, because it limits your usage options. But unfortunately it's a fact of life that some web content has been contaminated with it, so we have to deal with it....

You can enable playback of DRM content in Firefox like this:

Firefox menu button (with the three horizontal dashes on it) - Preferences - tab General - Digital Rights Management (DRM) Content: tick Play DRM-controlled content

Quicker updates for Firefox in Linux Mint

10. In Linux Mint, updates for your web browser Firefox come from Mint's own repository. Not straight from the Ubuntu sources.

In some cases, this might mean a delay of several days before you get the latest secure Firefox. This is a security risk.

If you don't want to wait, you can instruct your Mint to prefer the Ubuntu version of Firefox. Like this:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Then create a new preferences file by means of this terminal command (use copy/paste to avoid typing errors):

sudo touch /etc/apt/preferences.d/firefox-ubuntu

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

c. Then copy/paste this line into the terminal, in order to edit the new file:

xed admin:///etc/apt/preferences.d/firefox-ubuntu

Press Enter.

d. In that empty text file, copy/paste the following blue text:

Package: firefox*
Pin: release o=Ubuntu
Pin-Priority: 800


e. Save the modified text file and close it.

f. Launch Update Manager, refresh it and install the updates for Firefox (if any).

g. Close Firefox and launch it again.

Lost localization in the Ubuntu Firefox?

10.1. When you have a non-English Firefox, the Ubuntu Firefox that you've just installed might have lost its localization and turned fully English. This is how to fix that:

a. In the address bar of Firefox, type:

about:config

Press Enter and then click to accept the risk.

b. Then right-click anywhere on that page - New - String

c. Give the new string this name:

intl.locale.requested

Leave the value empty; this forces Firefox to follow the system locale.

d. Click OK.

e. Close Firefox and restart it.

Letters too small on web pages? Increase the font size

11. You can enlarge the displayed font size like this:

Press the Ctrl key and keep it pressed (don't release it). Now hit the plus key ( + ) for as many times as you wish, until the font size that you want is achieved. Minimize: keep the Ctrl key pressed and hit the minus key ( - ). Back to default: keep the Ctrl key pressed and hit the zero key ( 0 ).

This however enlarges both text and images. That often renders images ugly. Set the enlargement therefore to "Zoom Text Only". Like this:

First make the Firefox menu bar visible:
Firefox panel - right-click on the right of the green plus sign - tick:
Menu Bar


In the menu bar (first make it visible as described in item 1 on this page): View - Zoom - tick: Zoom Text Only.

Note: even if you see no tick box, you can place that tick nevertheless!

On laptops with small displays you can also use one of the nifty add-ons for setting the default zoom level. You can install one in Firefox like this: Firefox menu button (with the three dashes on it) - Add-ons - Get Add-ons.

Note: be very reluctant to install add-ons in Firefox: the more add-ons it contains, the slower Firefox becomes.

Optimize the Places database from time to time

12. In your Firefox profile there's an sqlite database called Places, which after a while starts resembling a swollen Swiss cheese with holes. That might slow your Firefox down.

You can speed your Firefox up a bit, by optimizing (vacuuming) that database: you can namely deflate that swollen Swiss cheese into a compact smaller cheese. As follows:

Type the following in the URL bar of Firefox:

about:support

Press Enter.

Almost at the bottom of the page you get to see then, there's a header called Places Database. Click there on the button called Verify Integrity.

You're done! Repeat this on a monthly basis, so that your Firefox won't lose speed again because of a swollen database.

Stop Firefox from automatically playing videos

13. It can drive a man crazy: videos that start playing automatically on web pages. Why, for heaven's sake, did someone at Mozilla think it's a good idea to enable that horribly invasive feature by default?

Thankfully there's this solution:

Firefox menu button (with the three horizontal dashes on it) - Preferences - tab Privacy & Security - section Permissions:
Autoplay: click on the button Settings... - Default for all websites: set that to Block Audio and Video - click on the button Save changes.

Make new tab pages empty

14. By default, when you open a new tab page, Firefox shows tiles of websites that you've previously visited. If you prefer those new tabs to show an empty page instead, you can do that as follows:

In the new tab, click the gear icon in the top right of the new tab - remove all checks except the one for Search.

Want to get rid of polluted settings in Firefox?

15. Do you have polluted settings in Firefox (possibly because of shady add-ons), and do you wish to start anew with a clean browser? Then proceed like described in item 7.1 on this web page.

Change the search engine of the Firefox search bar into Google or Startpage

16. Linux Mint has set Yahoo as default search engine for the search bar of Firefox. That's not ideal: most people prefer Google or the privacy-respecting Startpage (which yields Google results without invading your privacy).

Mint has made it rather difficult to change Yahoo into Google or Startpage (sigh...), but this is how you can still do that.

More tips?

17. Do you want more tips and tweaks? There's a lot more of them on this website!

For example:

Speed up your Linux Mint!

Clean your Linux Mint safely

Avoid 10 fatal mistakes


To the content of this website applies a Creative Commons license.

Back to the home page

Disclaimer