Most popular pages

Tips, tweaks and FAQ

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 panel - right-click a little on the right of the plus sign - tick:
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) - Settings - tab Privacy & Security

a. Item Enhanced Tracking Protection: leave those settings at their defaults, because otherwise some websites might function less well.

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

b. Item Website Privacy Preferences: tick (enable):

Tell websites not to sell or share my data

Send websites a "Do Not Track" request

c. Item Cookies and Site Data: Tick the setting:

Delete cookies and site data when Firefox is closed

d. Item History: change the setting to:

Firefox will: Use custom settings for history

e. Now tick the following setting:

Clear history when Firefox closes

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

g. Item Firefox Data Collection and Use: disable (untick) everything you see there.

h. Item Website Advertising Preferences: disable (untick) Allow websites to perform privacy-preserving ad measurement

i. Close the Settings 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.

Limiting the disk write actions of Firefox

3. By default, Firefox writes a lot to the hard disk. This reduces its speed. You can limit the disk write actions of Firefox, by disabling sessionstore and by putting the Firefox network cache into the RAM. Like this:

Disabling sessionstore

3.1. Firefox has a session restore feature, which remembers what pages were opened if Firefox experiences an unexpected shutdown (read: crashes). This feature is neat, but causes too many disk writes. Disable 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 button "Accept the Risk and Continue".

c. Copy/paste the following term into the filter bar (search bar):
browser.sessionstore.interval

d. Double-click on that item. The default interval is 15000, which means 15 seconds. Add four zeros to the existing value, so that it becomes: 150000000 and click the Save button.

Note: Don't try to add too many zeros: that won't work. Adding four zeros is more than enough anyway.

e. Close Firefox and launch it again. Now you've practically disabled the session restore feature.

Note (1): Leave other cache and sessionstore 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.

Putting the Firefox network cache into the RAM

3.2. By moving the Firefox network cache from your hard disk to the RAM, you diminish the amount of disk writes. This'll probably make your Firefox noticeably faster. The price you pay is small: it'll only "cost" you 512 MB of your RAM.

Note: Don't do this when your computer has only 4 GB of RAM or less! Because with little RAM, even 512 MB can't be missed.

Proceed 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 button "Accept the Risk and Continue".

c. Copy/paste the following into the filter bar (search bar):
browser.cache.disk.enable
Toggle its value to false by double-clicking it: this will disable "cache to disk" entirely.

d. Then you're going to determine how much memory can be used as RAM cache. Copy/paste this into the filter bar (search bar):
browser.cache.memory.capacity
That entry should exist already (if not, create it now).

The current integer value will probably be -1, which automates the maximum size of the RAM cache dependent on the available amount of RAM. So far so good, but this automation usually creates a cache that's far too small....

So set it to 524288 (KB, which equals a maximum of 512 MB) and click the Save button. That's usually enough for all amounts of RAM. But if you have RAM to spare, I recommend 1048576, which equals a maximum of 1 GB.

e. Close Firefox and launch it again. You're done! Check it like this:

Type in the URL bar:
about:cache
Press Enter.

By the way: you might then also see a mention of an "appcache" which might still be present on the disk, but there's no need to move that (much less frequently used) cache to the RAM as well.

Note: 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 - Settings

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. Close Firefox and launch it again. It should have a clean slate now.

d. Do your testing.

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

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

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

g. 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) - Settings - tab General - Digital Rights Management (DRM) Content: tick Play DRM-controlled content

Lost localization in Firefox?

10. When you have a non-English Firefox, updates might undo its localization so that it turns 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 on websites like this:

Increasing font size for individual web pages

11.1. For individual web pages the procedure is as follows. 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 a little on the right of the plus sign - tick:
Menu Bar


In the menu bar: View - Zoom - tick: Zoom Text Only.

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

Increasing font size for all web pages

11.2. You can also set the default zoom level for all web pages. Like this: Firefox menu button (with the three dashes on it) - Settings - section Zoom: set the Default zoom to 110 percent or higher.

Also, below that, tick: Zoom text only. Reason: otherwise pictures and images might become malformed.

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

Temporary relief: force Firefox to minimize its memory usage

16. Firefox bogging down your system? Then you can provide temporary relief by forcing Firefox to minimize its memory usage, like this:

Type in the URL bar of Firefox:
about:memory

Press Enter. Tab Free memory: click the button called Minimize memory usage

This offers only temporary relief; for a structural solution you'll need to investigate a bit more. Start with the usual suspects: the add-ons and extensions that you've weighed your Firefox down with.

Increase the default maximal sound volume in Firefox

17. The default maximum sound volume in Firefox can be far too low. In that case, you can improve it for HTML5 playback 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 button "Accept the Risk and Continue".

c. Copy/paste the following term into the filter bar (search bar):

media.default_volume

Change it to 1.5 or even 2.0 (the default is 1.0). Confirm the new setting.

d. You might be able to get better coverage of the new sound setting, by changing another item as well. Repeat the above for the following item:

media.volume_scale

e. Close Firefox and launch it again. The problem should be largely over. Note that this doesn't work in all cases nor on all websites! If it doesn't work, you can always fall back on installing pavucontrol, launching it and setting the sound beyond 100 percent.

Optional: Replacing Firefox by the Firefox straight from Mozilla

18. By default Firefox is being supplied by Linux Mint itself, from its own software repository. That has a disadvantage: you sometimes have to wait a while before the latest upstream Firefox from Mozilla, finally lands in your Linux Mint. This increases the time that your Firefox has unpatched vulnerabilities.

Another disadvantage of the Mint Firefox is, that minor Firefox releases that only contain bug fixes and no security fixes, are usually skipped. That's something that we also saw on Ubuntu, when Ubuntu was still packaging Firefox. This can cause inconveniences for users, as they have to deal longer with certain bugs.

If you find that undesirable, it's possible to replace your Mint Firefox by the Firefox straight from Mozilla. When you add the Mozilla repository to your sources list as well, you'll get updates for Firefox whenever Mozilla makes those available, without delay. Minor releases included. Below, you'll read how to achieve that.

Proceed like this:

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

b. First you're going to import the Mozilla signing key for its Firefox repository. Copy/paste the following command line into the terminal (it's one huge line):

wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null

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 you're going to add the Firefox repository itself to your sources list. Copy/paste the following command line into the terminal (it's one huge line):

echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null

Press Enter.

d. Now you're going to create a priority file, that ensures that the upstream Firefox always gets priority over the Mint Firefox. Copy/paste the following command line into the terminal:

sudo touch /etc/apt/preferences.d/mozilla

Press Enter.

e. The priority file is still empty, so you'll need to open it for editing. Copy/paste the following command line into the terminal:

xed admin:///etc/apt/preferences.d/mozilla

Press Enter.

(the three consecutive slashes are intended and no typo!)

f. Copy/paste the following blue text block into it:

Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000


g. Save the priority file and close it.

h. Now you can replace your current Firefox by the upstream Firefox, by simply executing the following command (copy/paste it into the terminal):

sudo apt-get update && sudo apt-get dist-upgrade

Press Enter.

i. When your Firefox is in American English, you're done: you can now simply close all running instances of Firefox and relaunch it. But if your Firefox is in another language than American English, you're not quite done yet; you'll need to replace the localization file for Firefox as well:

First remove your current localization file(s) with this terminal command (copy/paste it into the terminal):

sudo apt-get purge "firefox-locale-*"

Press Enter.

j. Then install the appropriate localization file for your language. When in doubt as to what file you need to install for your language, you can check the available localization files with this command:

apt-cache search firefox-l10n

Press Enter.

An example makes it easier. For my Dutch localized Firefox, I need to execute the following terminal command (copy/paste it into the terminal):

sudo apt-get install firefox-l10n-nl

Press Enter.

Note: When you have a localized (translated) Firefox, you'll now be notified by System Reports (mintreport) that you'll "need" to install a localization file for it. But don't do that: it wants you to install the localization package for the old Firefox that you've just removed, which is wrong for your new Firefox! So ignore that report.

k. Close all your current Firefox instances and relaunch Firefox. The job should be done.

More tips?

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