Making Firefox lean and secure

Mozilla Firefox is undoubtedly one of the best web browsers available. Thanks to its modular construction, it can be configured very precisely and also expanded to include many additional functions. However, heavy Internet use can lead to sluggishness for this browser. It may start slowly and websites may also load slowly. There are a few maneuvers you can use to handily help Firefox regain its original speed.

Hoarder

Many of the conveniences found in Firefox come at the expense of storing data, either temporarily or permanently. This data is not limited to things like URLs you have visited over the Internet and the content of websites you have visited. The Mozilla corporation, which develops and maintains the browser, also collects numerous pieces of user data by means of a series of default settings in order to improve the software and to stay informed of its operating condition.

Under Linux, you will see that large volumes of data quickly accumulate in the $HOME/.mozilla/firefox/ directory and its subdirectories. In addition to status reports that the browser collects and transmits to Mozilla servers, these directories contain crash reports and many other types of data. The software also saves up to five backups of your bookmarks even if you have used the corresponding dialog to save these externally.

The browser does anonymize the data, but it also saves it locally without any set intervals for deletions. As a result, more and more garbage in the form of data collects over time in the relevant subdirectories. In short, data continues to get collected and saved even though Firefox allows for deactivation of the individual functions under Advanced | Data Choices in the Settings menu.

All of the so-called telemetry ping data that Firefox collects about the computer system via the current browser version, various benchmark values, and extensions that have been installed ends up in duplicate also on the local system. The duplicates include a compressed and uncompressed version, both of which are available for transmission to the Mozilla servers.

Blockade

The first thing you should do in order to eliminate data collection and random local storage is to switch off all of the report functions in the Settings menu (Figure 1). This prevents transmission of generated information, but it does not stop collection activities. Putting a stop to data collection requires going into the browser's internal workings. Your next step is to open the Firefox configuration dialog by entering about:config in the address line.

Figure 1: You should deactivate the transfer of telemetric data to Mozilla.

After confirming the alert message, you will find yourself in the configuration editor. When you enter the expression toolkit.telemetry in the search field, a list of relevant administration options will appear. You should look for the following three entries: toolkit.telemetry.archive.enabled , toolkit.telemetry.enabled , and toolkit.telemetry.unified . By double-clicking, you set each to false . This deactivates all data collection for the telemetry.

If you want to be absolutely sure that the browser is not sending any data whatsoever to Mozilla, you should also delete the data in both of the lines toolkit.telemetry.server and toolkit.telemetry.infoURL (Figure 2).

Figure 2: In order to prevent the gathering and transfer of the telemetry data, you will need to intervene in the browser's internal workings.

Data Reports

The web browser collects data on the status of the software and crashes in the subdirectory datareporting within the hidden Firefox directories. If no changes have been made to the default settings, the software will also transfer this data to the Mozilla servers.

Even if the settings have been modified to prevent data transfer, Firefox continues to collect the data and store it locally. Although the amount of data collected each time is very small, intensive browser use can quickly lead to hundreds or even thousands of files for which you have no use.

In order to permanently stop the browser's habit of gathering up data, you will need to head over to the manual configuration dialog about:config page again and should look for the datareporting option. By double-clicking on the line datareporting.policy.dataSubmissionEnabled , you will set the option value to false if it was previously set to true (Figure 3).

Figure 3: It is also possible to prevent collection and storage of local information.

This procedure works a bit differently for Firefox versions 40.x or lower. If you have one of these older versions, you should set the entries datareporting.healthreport.uploadEnabled and toolkit.telemetry.enabled to false . In the interest of security regardless of the version you are using, you can also delete the address for the Mozilla servers.

The Cache

In addition to saving data permanently, Firefox also tries to speed up load times for websites through various means offered by caching. In the process, the web browser uses working memory, the hard drive, and SSDs as a buffer.

Especially when you are using an older hard drive that is slower, you will forfeit quite a bit of speed when there is frequent access to bulk storage. It therefore pays to keep an eye on the cache memory and to delete it if necessary. Although Firefox offers suitable options for this task in the Preferences | Advanced | Network menu, these settings are difficult to access and monitor.

The Cache Status [1] add-on provides a solution for these difficulties. When installed, you will see two icons to the right of the address field. These two icons constantly keep you informed of the current assignment of memory space in kilobytes. This gives you an overview of the cache.

You can set the maximum size you want for the cache memory using the add-on's dialog. Go to Tools and then Add-ons and pick the Extensions tab (Figure 4). To empty the cache, you will need to right-click the icon in the address bar and select Delete entire cache from the Context menu. Given all of the data privacy and security issues that may arise, it is a good idea to empty the cache after each session.

Figure 4: The settings dialog in Cache Status regulates all of the important options.

Radical Dieting

Occasionally it happens that Firefox reacts very sluggishly to input while generating a high CPU load. The command-line tool htop helps you figure out whether it is the web browser that is slowing the computer down. If so, this could be because add-ons have gotten out of control and caused a high system load. These loads might even lead to a system crash.

In order to determine what is happening, you should start Firefox in safe mode, which in turn deactivates all of the installed add-ons and themes. You can initiate a safe start by picking the option Restart with Add-ons disables… from the browser Help menu or using the command-line call firefox --safe-mode .

If the browser now works significantly faster and does not cause any further problems, you should systematically disable all of the installed add-ons that and then reactivate them one by one. There is a description for the easiest way to do this on the support page which you can open by entering about:support .

This page provides plenty of information about the libraries, modules, and add-ons that are used, as well as modified browser options. If you click at the top right on the Refresh Firefox … button, the software will delete all of the add-ons, as well as some of the settings (Figure 5). This also affects changes that have previously been made to the configuration. The bookmarks, any open tabs, and saved passwords that have been activated all remain untouched.

Figure 5: Firefox offers a feature that allows for a complete reset to factory settings.

Generally, it is a good idea to activate a thorough cleaning like this only after you are sure that the add-ons are not responsible for the heavy load on the hardware.

Conclusion

Firefox tends to get less responsive with long sessions and the installation of lots of add-ons. Caches and log functions also increase the amount of memory required. The well-engineered concepts in this web browser help even the less experienced user put the browser on a sustainable data diet. This in turn leads to improved work speed. Regularly deleting the cache and switching off unnecessary log functions also gives you better data privacy and security protection. Tracking your search behavior does not work without these files. This applies to both local tracking and telemetry.