Javascript required
Skip to content Skip to sidebar Skip to footer

Firefox Put Cache in Memory Easy Linux Tips Project

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:

  • 1. Menu bar visible in Firefox
  • 2. Make Firefox cleanse itself automatically upon quitting
  • 3. Limit the disk write actions of Firefox
    • 3.1. Putting the Firefox network cache into the RAM
    • 3.2. Disabling sessionstore
  • 4. Disable spam by Web Push notifications
  • 5. Disable the memory of the URL bar
  • 6. Some graphics cards: disable hardware acceleration in Firefox
  • 7. Add-ons and extensions: don't turn Firefox into a Christmas tree
    • 7.1. Test Firefox with a clean slate
  • 8. Run Firefox from within a secure sandbox
  • 9. Enable rendering of DRM content
  • 10. Lost localization in Firefox?
  • 11. Letters too small on web pages? Increase the font size
  • 12. Optimize the Places database from time to time
  • 13. Stop Firefox from automatically playing videos
  • 14. Make new tab pages empty
  • 15. Want to get rid of polluted settings in Firefox?
  • 16. Change the search engine of the Firefox search bar into Google or Startpage
  • 17. Temporary relief: force Firefox to minimize its memory usage
  • 18. More tips?

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

Limit the disk write actions of Firefox

3. You can limit the disk write actions of Firefox, by putting the Firefox network cache into the RAM and by disabling sessionstore. Thus reducing its use of system resources. Like this:

Putting the Firefox network cache into the RAM

3.1. 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 as well. 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 2 GB of RAM or less! Because with very 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 "I accept the risk!".

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. (expired)

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

The currentinteger 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 to524288 (KB, which equals a maximum of 512 MB). 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.

f. Close Firefox and launch it again. Then check it like this:

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

By the way: you'll then also see a mention of an "appcache" which might still be present on the disk, but there's absolutely 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.

Disabling sessionstore

3.2. 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 many disk writes. Too many for an SSD. 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 "I accept the risk!".

c. Type in the filter bar: sessionstore

c. Double-click on the item called browser.sessionstore.interval . The default interval is 15000 , which means 15 seconds. Add three zeros to the existing value, so that it becomes: 15000000 and click the OK button (note: adding too much zeros causes a malfunction! So add just three zeros.).

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

Note (1): Leave the 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.

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

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.

Temporary relief: force Firefox to minimize its memory usage

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

More tips?

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

macdougallnoth1952.blogspot.com

Source: https://easylinuxtipsproject.blogspot.com/p/firefox.html