Mozilla Firefox is eating up memory - what should I do? Firefox Memory Optimization


Creating "portable" settings

All interesting Firefox settings are made on the service page at about:config. Going here and changing a couple of parameters is easy and convenient. But if we talk about fine tuning, then changing values ​​one by one becomes a little tedious.

How to automate the process without resorting to third-party utilities? It’s very simple: create a user.js file and write all the settings there. Next, we place this file in the Firefox user profile directory, which in Windows is located at C:\Users\[username]\AppData\Roaming\Mozilla\Firefox\Profiles\[random].default. The format of the entries in this file is simple: for example, to enable WebP support, you need to set the image.webp.enabled parameter to true. In the settings file it will look like this:

user_pref("image.webp.enabled", true);

In other words, in the template user_pref(“…”, …); there is a parameter and its value. So, we’ve sorted out the settings file, now let’s start dissecting the browser. All settings were applied to the latest browser version at the time of writing.

Where are the settings saved?

Where are browser settings stored? Mozilla Firefox, like all other browsers, stores all information changed and entered by the user, including bookmarks, passwords, cookies, caches and settings, in a profile folder, which is not located in the browser's public folder on the system drive. The profile is created by the program by default immediately after the first launch of the program on the PC after successful installation.

The profile folder is located in the Application Data folder and then in Roaming on the system drive. These folders are usually hidden from the eyes of the average user, but they can be accessed.

Disable everything unnecessary

WebRTC and Pocket

Mozilla has implemented WebRTC and Pocket services in Firefox and enabled them by default. Many people didn’t like this, and for good reason: vulnerabilities were found in Pocket, and WebRTC can leak an IP address under certain circumstances. Let's turn both off! Now and below I provide ready-made settings lines that you can copy to the user.js file.

// Disable Pocket user_pref("extensions.pocket.api", ""); user_pref("extensions.pocket.enabled", false); user_pref("extensions.pocket.site", ""); user_pref("extensions.pocket.oAuthConsumerKey", ""); // Disable WebRTC user_pref("media.peerconnection.enabled", false); user_pref("media.peerconnection.ice.default_address_only", true); user_pref("media.peerconnection.ice.no_host", true); user_pref("media.peerconnection.ice.relay_only", true); user_pref("media.peerconnection.ice.tcp", false); user_pref("media.peerconnection.identity.enabled", false); user_pref("media.peerconnection.turn.disable", true); user_pref("media.peerconnection.use_document_iceservers", false); user_pref("media.peerconnection.video.enabled", false); user_pref("media.peerconnection.default_iceservers", "[]");

Geolocation

Disable access to geolocation.

user_pref("geo.enabled", false); user_pref("geo.provider.ms-windows-location", false); user_pref("geo.wifi.uri", "");

Browser usage statistics and various metrics

We block the collection of various data.

// Disable asynchronous requests used for analytics user_pref("beacon.enabled", false); user_pref("browser.send_pings", false); user_pref("browser.send_pings.require_same_host", false); // Disable performance metrics user_pref("dom.enable_performance", false); user_pref("dom.enable_performance_observer", false); user_pref("dom.enable_performance_navigation_timing", false); user_pref("browser.slowStartup.notificationDisabled", false); user_pref("network.predictor.enabled", false); user_pref("network.predictor.enable-hover-on-ssl", false); user_pref("network.prefetch-next", false); user_pref("network.http.speculative-parallel-limit", 0); // Information about installed add-ons user_pref("extensions.getAddons.cache.enabled", false);

Continuation is available only to members

Option 1. Join the “Xakep.ru” community to read all materials on the site

Membership in the community during the specified period will give you access to ALL Hacker materials, allow you to download issues in PDF, disable advertising on the site and increase your personal cumulative discount! More details

Instructions

The main problem is that browser settings that affect performance are hidden. And therefore the average user cannot reach them. Besides, everything is in English. And a person without certain knowledge gets confused.

In this material we will talk about how to get to the hidden settings, which of them can be changed and what changing this or that value in the hidden settings of Mozilla Firefox will give. Let's start the story.

How to get to the settings menu?

The list of standard web browser settings does not contain the items we need. To access this menu you will have to use the address bar of your browser. That is, exactly the column where the names of sites are entered.

What do I need to do to access Firefox's hidden settings? about:config command in the address bar and press the Enter on the keyboard. This is the only way to get to the values ​​that we need.

It is worth noting that after this command, a message will appear indicating that you need to be careful with the settings, as you may lose your warranty. You just need to click the “I accept the risk” .


After this, the settings we need will open.

Reducing RAM consumption

If it seems to you that the browser consumes a lot of RAM, then it is possible to moderate its appetite somewhat by fine-tuning. To do this you will have to disable something. You will also need to reduce some values.

  1. First, right-click on an empty space and in the context menu that appears, select “Create” , then “Logical” .
  2. Next, enter the name of the parameter in the corresponding line – config.trim_on_minimize and press Enter on the keyboard.
  3. After this you need to assign a value. Select True and click on the “OK” .

This tweak will reduce RAM consumption by approximately 20%. After this, you can proceed to further configuration of the Mozilla Firefox web browser. Next we do this:

  1. browser.sessionstore.interval into the search bar . The appropriate setting should appear.
  2. The default number is 15000 . It can be increased to 100,000 . To do this, double-click on the setting, enter the desired number in the appropriate line and press Enter .

This action increased the time period after which the web browser saves the current session to disk. Increasing this indicator allows you to slightly unload the RAM. Let's configure the browser further.

  1. Enter browser.sessionhistory.max_entries and press Enter .
  2. Double-click on the parameter and change the entered value to 20.

This parameter is responsible for the number of steps that the user could take using the Back button. In principle, you can even set the value to 15 . It won't get any worse. But a certain amount of RAM will be freed up. Let's continue with the setup:

  1. browser.sessionhistory.max_total_viewers parameter and double-click on it.
  2. Change the value from -1 to 2 and save the changes using the “OK” .

This parameter is responsible for the number of previously opened pages in memory. It is thanks to him that when you press the “Back” button, the previous page loads instantly. Changing this value frees up a decent amount of memory space:

  1. Next, find the parameter browser.sessionstore.max_tabs_undo and double-click on it.
  2. In the corresponding window, change the value 10 to 3 .

This setting controls the number of closed tabs in memory. By default there are 10. But most users do not need that many. Therefore, the value can easily be reduced to three.

All of the above steps help to significantly reduce the browser's RAM consumption. This is especially useful for owners of old PCs and laptops with little RAM. However, let's move on to the next chapter.

Improving browser performance

Now let's talk about how to make Mozilla Firefox work faster. There are also corresponding hidden settings for this. But you need to know which of them can be changed. Now we will tell you everything in detail.

Start next

  1. geo.enabled parameter and double-click on it with the left mouse button.
  2. The values ​​are set to False .

We have just disabled geolocation options. The fact is that Firefox constantly requests data about the user's location. This thing is completely useless. And turning it off will speed up your web browser.

  1. Now we are looking for a setting called “accessibility.typeaheadfind”.
  2. Double-click on it and set the parameters to “False”.

We've just disabled autocomplete in the search bar. These suggestions do not play a special role, but they slow down the web browser a little. Therefore, it is better to disable this option. The browser will work faster.

  1. Next step: look for network.prefetch-next and double-click on the setting.
  2. Set to False .

With this action, we prevent the browser from predicting whether the user will open links. When a web browser does this, it begins to load the content that is located at this very link. And this slows down work.

All of the above can make your web browser work noticeably faster. But it is better not to touch the remaining settings, as changing them can lead to very sad consequences.

How to speed up Mozilla Firefox browser even more?

If you used the advice given above, you probably noticed that Firefox began to launch faster and work more quickly. But there is no limit to perfection, and if you are determined to squeeze out of your browser all the speed it is capable of, let’s continue.

Not all Mozilla Firefox commands are open to the naked eye, and to speed up Mozilla we will use one of these undocumented features. Type the following command into your browser's address bar: about:config and press enter. A warning will appear, agree and click the “I promise I will be careful!” button.

Go to the Mozilla Firefox configuration page

You will then be taken to the browser configuration page, where direct hands can do a lot to speed it up.

The Mozilla settings page is a real browser control panel!

Note that some of the lines in bold are the values ​​that have been changed. Very soon there will be even more of them. So, let's go.

Go to new tab from link

Typically, when you open a link in a new tab, the focus remains on the current page and you have to click on the newly opened tab to see its contents. If you don't like this approach and want to go directly to a new tab, this option can be enabled in Firefox's hidden settings.

Look for the option browser.tabs.loadInBackground and set its value to “ false ”. Now, when you open a link in a new tab, you'll be taken directly to it. Keep in mind that this feature may not be very useful if you need to open multiple links from the same page at the same time.

Basic setup

You can and should customize your browser. All standard changes cannot harm the browser: in any case, it will work effectively. Even if you notice that the performance is not the same after tuning, you can always return the program to its original state using the restore option.

  1. Click on the three-bar icon in the browser panel on the right.
  2. Select "Settings". A new tab will open. It does all the standard Firefox settings.
  3. Select the section you need.

What settings are recommended to be made immediately?

  • Specify the location where all files downloaded using this browser will be saved. This will eliminate the need for the guide to search for the right path each time.
  • In the Content tab, turn on pop-up blocker.
  • Check that in the “Privacy” section there is no prohibition on saving session data. If the phrase “do not remember history” appears, then all information will be deleted from the program along with its closure. If you want to have a private mode, leave everything as is.

How to migrate a Firefox profile

What is better not to turn off?

  • The “Protection” section contains items that are not recommended to be disabled, as this will reduce the level of security for the browser and the PC as a whole. The “Master Password” item is left at the user’s discretion.
  • It is better to leave all the marks in the “View Sites” tab. This will make it more convenient for you to work in the browser.
  • The “Data Selection” item was created for development specialists. When various errors occur, information is transmitted to them. Next, they analyze it and solve user problems. Accordingly, it is better for this option to be activated.

Settings

To access hidden browser settings, enter about:config in the address bar and press Enter. We get this result:

Let's proceed directly to the settings. Let's change the settings to speed up page loading.

  • Parameter “network.http.pipelining” – set to “true” (Use pipelining data processing for direct connections)
  • Parameter “network.http.proxy.pipelining” – set to “true” (Use data pipelining when connecting through a proxy)
  • Parameter “network.http.pipelining.maxrequests” – set the value to 32 (Maximum number of pipeline requests)
  • Parameter “network.http.pipelining.firstrequest” – set to “true”
  • Parameter “network.http.proxy.firstrequest” – set to “true”
  • Parameter “network.http.max-connections” – set the value to 48 (Maximum number of simultaneous HTTP connections)
  • Parameter “network.http.max-connections-per-server” – set the value to 24 (Maximum number of simultaneous connections to one server)

These and other parameters that can affect page loading speed are visible in the figure.

To change the size of RAM consumed by Firefox, as well as the size of disk space, change the following parameters:

  • Parameter “browser.cache.memory.capacity” – change to 65536
  • Parameter “browser.cache.disk.capacity” – change to 76800

Another parameter that speeds up the response time between the server and the start of displaying the web page:

  • Parameter “nglayout.ititialpaint.delay” – change to 0 (Pause before page drawing starts (in ms))

You can also use special chrome addresses for additional settings:

  • chrome://browser/content/bookmarks/bookmarksManager.xul - bookmark manager. You can also change settings in the browser itself.
  • chrome://browser/content/bookmarks/bookmarksPanel.xul - bookmarks panel
  • chrome://global/content/console.xul - JavaScript console
  • chrome://pippki/content/pref-master-pass.xul - setting the master password

And finally, a few extensions that I use.

Editing and adding parameters in about:config

To change the value of the about:config parameter, you need to hover the cursor over it and double-click the left mouse button. If the parameter has a logical value (“True” - on, or “False” - off), then it will change its value to the opposite.

If the parameter requires changing the setting value (Value) or something else, then after double-clicking on it, a sign will appear in front of you in which you will need to enter the desired value.

This parameter requires a numeric value to be entered

You can also change the value of the desired parameter by hovering the cursor over it, right-clicking, and selecting “Modify”.

To reset a modified parameter (with a thicker font) to its default value, you need to hover the cursor over it, right-click, and select “Reset”.

To add the parameter you need, move the cursor over an empty space in this list, right-click, and select “New” from the menu that appears. Then, following the arrow, select the specifics of the parameter being created (“String-Integer-Boolean” - “String-Integer-Boolean”). In the line that appears, enter the appropriate value and click on “Ok”

To create a logical parameter, select “New” - “Boolean”

I recommend: How to make Firefox your default browser?

How to open hidden settings in Firefox?

Go to the following link in your browser's address bar:

A message will appear on the screen warning of the risks of browser failure if you thoughtlessly change the configuration. Click on the “I accept the risk!” .

Below we will look at a list of the most notable parameters.

Suspend tab extensions

If you want to reduce memory usage in Firefox on any platform, you can use the Suspend Tab extension. It can reduce memory consumption by suspending background tabs, and also allows you to automatically stop them after a certain period of time and then manually resume them.

After installing the Suspend extension, you can right-click and select Suspend Tab from the context menu. This will immediately clear all memory used by that tab and put it in the background. At any time, if you want to return to this paused tab, you can right-click it and select Resume from the menu. This will load the web page.

In the Suspend extension options, you can automatically suspend background tabs after a specified period of time, the default is 30 minutes. Suspend allows you to reduce the memory consumption of the Firefox browser. Unlike the Memory Fox extension, which only works on Windows, it can be used on all platforms.

Block video from autoplay

Often, websites play audio and video without prior permission, and while this can be annoying, it can sometimes have devastating consequences. To prevent this from affecting your mood or even your rapport, you can disable this feature by default from the hidden settings in Firefox.

To access the setting, enter " media.autoplay.default" in the search bar and then set the integer value to "1" To enable this feature, if you select any other number instead of 1, websites will be able to play videos by default. as soon as the page opens. But if this option is set to 1, the media will only play when the Play button is pressed.

Using the SpeedyFox tool

Optimizing memory for the browser reduces time consumption and leaves more memory for other programs. SpeedyFox is a tool designed specifically to compress SQLite database files, which in turn will reduce the time spent reading and writing. In addition to Firefox, for which it was originally developed, SpeedyFox can now also integrate databases for Chrome, Epic Browser, SRWare Iron and Pale Moon.

It also supports Mozilla Thunderbird and Skype tools. When you launch the portable executable, SpeedyFox automatically detects and loads a default profile for each of the supported applications. Since it is very popular these days, it is also possible to download user profiles for portable versions of Firefox or Chrome. Procedure:

  1. Click on the SpeedyFox menu bar and select “Add a custom profile” or drag the folder into the Firefox program window, memory optimization will begin after checking the application profiles and clicking the “Optimize” button.
  2. SpeedyFox will begin compacting SQLite databases. The progress window will show which databases have been optimized and how much space is being saved. You need to make sure that the programs being optimized are not currently running or they will not be processed. The author of SpeedyFox recommends running the tool every 1-2 weeks depending on the usage of enabled browsers.
  3. SpeedyFox also works from the command line, and can easily be placed in the form of a shortcut or script. To do this, you'll need to click "Command Prompt" then "Copy" to copy the current command and options to the clipboard and place them in a batch file or desktop shortcut to be launched by double-clicking.

If none of the previous solutions work, you can try using a different browser, as some PCs conflict with Firefox. If the same problem occurs with other browsers, you might want to consider upgrading your RAM.

What is about:config?

The "about:config" command is a feature of the Mozilla Firefox browser that allows you to display a detailed list of settings for this browser (known as "preferences") on your PC screen. The specified settings are read by the browser from the “prefs.js” and “user.js” profile files, as well as from the default template settings.

The list of Mozilla Firefox settings displayed using the "About:config" command includes several hundred values, and is hidden from the average user by default. This is due to the fact that incompetent changes to a number of parameters from this list can lead to unpredictable consequences, including the failure of the browser.

List of settings in about:config

Rating
( 2 ratings, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]