Firefox

This document describes decluttering Firefox and make it faster on Linux

browser.bookmarks.openInTabClosesMenu in about:config was changed to false.(True=default)

(1) Open your currently active profile folder

Open your currently active profile folder by typing about:support in the address bar and press Enter/Return to load it. In the first table on the page, find the Profile Folder row and click the button to the right, which will say “Open Directory”.

(2) Create a new folder named chrome in the Profile Folder

(3) Create a new text file inside the chrome folder named userChrome.css (or download a blank one). Refer below for the contents of the file.

(4) Set Firefox to look for userChrome.css at startup. Type about:config in the address bar and press Enter/Return. Click the button accepting the risk. In the search box above the list, type β€œuserprof”. Double-click the toolkit.legacyUserProfileCustomizations.stylesheets preference to switch the value from false to true.

That change should take effect on your next startup.

Fill the userChrome.css β†— with following content:

#appMenu-mainView toolbarseparator,

#appMenu-fxa-status,

#appMenu-protection-report-button,

#appMenu-tp-separator,

#appMenu-new-window-button,

#appMenu-private-window-button,

#appMenu-fission-window-button,

#appMenu-non-fission-window-button,

#appMenuRestoreLastSession,

#appMenu-zoom-controls,

#appMenu-edit-controls,

#appMenu-library-button,

#appMenu-logins-button,

#appMenu-addons-button,

#appMenu-ssb-button,

#appMenu-preferences-button,

#appMenu-customize-button,

#appMenu-open-file-button,

#appMenu-save-file-button,

#appMenu-print-button,

#appMenu-find-button,

#appMenu-more-button,

#appMenu-developer-button,

#appMenu-whatsnew-button,

#appMenu-help-button,

#appMenu-quit-button {

display: none;

}

To avoid opening a second instance of firefox?

wmctrl -Fxa Navigator.Firefox || firefox &

*Limiting the disk write actions of Firefox (for ssd)*

  1. You can limit the disk write actions of Firefox, by putting the

Firefox network cache into the RAM and by disabling sessionstore. Like this:

*Putting the Firefox network cache into the RAM*

12.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 200 MB of your RAM.

Note: don’t do this when your computer has less than 2 GB of RAM! Because with very little RAM, even 200 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. Now you’re going to make sure that “cache to RAM” is enabled. β†— Copy/paste β†— the following into the filter bar (search bar):

browser.cache.memory.enable

This should already be set to true; if not, toggle it to true by double-clicking it.

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

This entry should already exist (if not, create it now). The current integer value will probably be -1, which automates the size of the RAM cache dependent on the amount of RAM. Set it to 204800 (the figure indicates KB, which equals 200 MB). That’s usually more than enough for all amounts of RAM.

***I did not make the above change

f. 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’ll then also see a mention of an “appcache” which is still 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.

*Disabling sessionstore*

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

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.

Source: https://askubuntu.com/questions/108765/how-to-avoid-opening-a-second-instance β†— β†—

Source: https://www.userchrome.org/how-create-userchrome-css.html β†—

https://easylinuxtipsproject.blogspot.com/p/firefox.html β†—


Β© Prabu Anand K 2020-2026