-   Linux - Software (
-   -   tweaking the **** out of firefox 3 (

H_TeXMeX_H 05-23-2009 10:13 AM

tweaking the **** out of firefox 3
Today firefox 3 really pissed me off, so I decided to hack at it until I beat/chopped it's bloody corpse into the shape I want it.

I've found many tweaks that I didn't know existed, and they helped me make firefox 3 a lot more like previous versions, both in speed and in layout. Surely you have noticed that the FF devs have decided to add a lot of useless BS buttons to FF 3 that usually are not only redundant but also get in the way of browsing. Anyway here are some of the nice tweaks I found to beat this unruly dirty fox into shape.

So almost all of the following require that you type 'about:config' in the address bar (no quotes) and press Enter, in case you didn't know. You can then search for keys, or add new ones. To add new keys, in about:config you right-click (somewhere inside the lower window) -> New -> String | Integer | Boolean. You'll be using integers and booleans. Doesn't this kinda remind of Window$ regedit ... sends chills down my spine.

Speed tweaks:
The important ones are all listed here:
EDIT: old link dead, still can use:
Note that they fail to mention that you may actually have to add new keys to about:config, as stated earlier.

For full details see:

More useful sites (thanks GrapefruiTgirl)

Fixing Back and Forward mouse buttons, if they don't work (I always have to do this):
Change these keys:


mousewheel.horizscroll.withnokey.action 2
mousewheel.horizscroll.withnokey.numlines -1
mousewheel.horizscroll.withnokey.sysnumlines false


Fixing middle mouse button opening urls by accident:


middlemouse.contentLoadURL false

config hacks:
Most are found here:

There's an error here tho, in # 8)
disable annoying browser behavior (javascript hijacks)
You should set all those to true, really I recommend you set all


dom.disable_window* true
because you have to disable these by setting them to true. These are the things you let javascript disable, such as those annoying popups that disable various parts of your FF window, such as url bar, toolbars, etc. You don't want that do you, only some of these options are available under preferences -> content -> javascript advanced.

You may also want to look into this option:
By default it is set to 2 which lets some popups bypass the usual protection that this feature offers, so I set it to 0 (this is the default for seamonkey, or you could set it to 1, but you may have problems with downloads from certain sites not working)

Code: 0
I don't recommend # 1) in the article.

disable large images in history -> recently closed tabs

ever notice that if you close an image and then want to open it via history it will show the whole image in there ... lol. To disable this nonsense do:

Code: 0
remove useless buttons from url bar right hand side

Go to '~/.mozilla/firefox/*.default/chrome', rename 'userChrome-example.css' to 'userChrome.css', then edit it and add the following to the bottom:


/* Disable "List all Tabs" Button */
.tabs-alltabs-button {
display: none !important;

/* Disable Container box for "List all Tabs" Button */
.tabs-alltabs-box {
display: none !important;

/* Remove the Bookmark star */
#star-button {
display: none !important; }

/* Remove live feed icon in Address url toolbar */
#feed-button {
display: none !important;

/* Remove the drop arrow in the Address bar */
.autocomplete-history-dropmarker {
display: none !important;

See here for more options:


See here, as most DNS servers don't yet support ipv6 (check with your DNS server), you should disable it:

DNS settings

user_pref("network.dnsCacheExpiration", 360);
user_pref("network.dnsCacheEntries", 100);
user_pref("network.ftp.idleConnectionTimeout", 60);
user_pref("network.http.keep-alive.timeout", 30);
user_pref("network.http.request.max-start-delay", 5);
user_pref("network.http.connect.timeout", 30);


crashing (last but not least, how to stop FF from crashing):
Possibly useful in making FF not crash:
as is listed here many things can contribute to instability, if you research into it, you'll be able to solve many crashes by removing plugins or extensions or toolbars.

Firefox 3.5 specific

FF 3.5, removing the "Recently Closed Windows" menu option
add this to 'userChrome.css' as stated above:

menu[label="Recently Closed Windows"]
  display: none !important;

FF 3.5 disable tab drag & drop preview thumbnails

nglayout.enable_drag_images false

FF 3.5 disable tab tearing

See here:
Basically you need this extension:

Firefox 4.0 specific

Most of the changes from 3 to 4 are listed here, along with their fixes:

thanks to brianL for finding the link.

Some new menu buttons that have popped up, and I don't like them, so here's how to remove them. Add this to 'userChrome.css' as stated above:


/* Remove Restore Previous Session button */
#restorePreviousSession, #historyRestoreLastSession {
display: none !important;

/* Remove Subscribe to This Page... button */
#subscribeToPageMenuitem, #subscribeToPageMenupopup {
display: none !important;


Also see:

In FF4, the 'chrome' directory may not exist, so just create it and make the 'userChrome.css' file, just remember to put this at the very beginning of the file, or it won't work:


@namespace url(""); /* set default namespace to XUL */
Hope that helps someone, and if I missed anything important or if you have some more tweaks I'd be happy to see them :)

Just for your info, extensions that I have installed:
- Adblock Plus
- Download Statusbar
- Flashblock
- Noscript
- SQLite Manager (useful for FF3 and up, as sqlite databases have replaced plain text storage of bookmarks and cookies)
- Show Go! (always show the go button, I like it)
- User Agent Switcher (for sites that like to discriminate and think they can)
- refspoof (for sites that think they can stop me from viewing hot-linked images and such)
- bug489729 (disables tab tearing on FF3.5 and 4.0)
- Greasemonkey

Some new ones:
Adblock Plus Pop-up Addon
Element Hiding helper for Adblock Plus

Quakeboy02 05-23-2009 12:18 PM

The best tweak I found for FF3 was to uninstall it and fallback to FF2. :)

H_TeXMeX_H 05-23-2009 01:07 PM


Originally Posted by Quakeboy02 (Post 3550398)
The best tweak I found for FF3 was to uninstall it and fallback to FF2. :)

Yeah, I wish I could do that, but I still sometimes need java to work, and 64-bit java only works on FF3. I guess I could keep both around, but it's kind of a hassle. Either way with these tweaks it works a lot better, almost like FF2.

Quakeboy02 05-23-2009 03:03 PM

Can you use 32-bit java with FF2 on a 64-bit kernel? I still haven't made the jump to 64-bit and I'd kind of like to; just to get SETI running on CUDA. Maybe they'll release the 32-bit version and it'll be a moot point. :)

H_TeXMeX_H 05-23-2009 03:42 PM


Originally Posted by Quakeboy02 (Post 3550495)
Can you use 32-bit java with FF2 on a 64-bit kernel? I still haven't made the jump to 64-bit and I'd kind of like to; just to get SETI running on CUDA. Maybe they'll release the 32-bit version and it'll be a moot point. :)

Yeah, I'm quite sure you can, I had to do that for a while and it was a PITA, before they came out with the 64-bit java plugin.

H_TeXMeX_H 05-24-2009 02:43 PM

After spending yet more time tweaking I added a few things, and fixed a few things.

H_TeXMeX_H 06-17-2009 04:47 AM

I just remembered the middlemouse.contentLoadURL one, it's very useful. Also added some links suggested by GrapefruiTgirl, they are quite comprehensive and useful.

craigevil 06-17-2009 10:39 AM

/* Speed Tweak - Common to all Configurations */
user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 8);
user_pref("content.notify.backoffcount", 5);
user_pref("plugin.expose_full_path", true);
user_pref("ui.submenuDelay", 0);
/* Speed Tweak - Fast Computer Fast Connection */
user_pref("content.interrupt.parsing", true);
user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 16);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("browser.cache.memory.capacity", 65536);

/* Speed Tweak - Another Tweak */
user_pref("network.dns.disableIPv6", true);

//*External Applications*//

/* Tor */

/* Picasa */
user_pref("network.protocol-handler.external.picasa", true);
user_pref("", "/usr/bin/picasa");

/* Multimedia players */
user_pref("", "/usr/bin/mplayer");
user_pref("network.protocol-handler.external.mms", true);
user_pref("", "/usr/bin/realplay");
user_pref("network.protocol-handler.external.rtsp", true);

/*Use Icedove for nntp/news*/
user_pref("network.protocol-handler.external.nntp", true);

/*Handle help:// links in Firefox*/
user_pref("", true);
user_pref("", "khelpcenter");

/* Access local files*/
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "http://localhost");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");

//* 2.0/3.0 Specific Ui tweaks *//

/* Fix the font layout */
user_pref("layout.css.dpi", 0);

/* Hide the Go button */
user_pref("browser.urlbar.hideGoButton", true);

/* Get rid of the ugly gtk file picker */
user_pref("ui.allow_platform_file_picker", false);

/* Set backspace key to go to previous page */
user_pref("browser.backspace_action", 0);

/* Block 3rd party cookies */
user_pref("network.cookie.cookieBehavior", 1);

//*Turning off Web annoyances*///

// Turn that annoying autocomplete popup REALLY off:
// (This actually has a UI but it's buried.)
user_pref("browser.urlbar.autocomplete.enabled", false);
user_pref("browser.urlbar.showPopup", false);
user_pref("browser.urlbar.showSearch", false);

/* Disable network prefetching/search engine suggest */
user_pref("network.prefetch-next", false);
user_pref("", false);

/* Put an end to blinking text! */
user_pref("browser.blink_allowed", false);
user_pref("browser.display.show_image_placeholders", false);

/* Disable Find As You Type */
user_pref ("accessibility.typeaheadfind", false);

/* Disable image animation */
user_pref("image.animation_mode", "none");

/* Disable scrolling marquees */
user_pref("browser.display.enable_marquee", false);


/* Crystal Theme Changes */

/* Use MEDIUM "Penguin" throbber image in all places, always. */
@import url("chrome://global/skin/subskin/throbber-med.css");
/* Change the Address Bar image from default "Page" to "Tux" image. */
@import url("chrome://global/skin/subskin/url-tux.css");

/* Change Tab image from default "Page" to "Tux" image. */
@import url("chrome://global/skin/subskin/tab-tux.css");

/* Change Tab-loading image from default "Circular" to "Penguin" image.
* (If you use this with any of the four options above,
* place it below that entry.) */
@import url("chrome://global/skin/subskin/tab-penguin.css");

/* Restore default OS menulists in Linux. */
@import url("chrome://global/skin/subskin/dropmarker-fix.css");

/* Use Stylized address and search bars. */
@import url("chrome://global/skin/subskin/rounded.css");

/ * Do not remove the @namespace line -- it's required for correct functioning */
@namespace url(""); /* set default namespace to XUL */

/* Remove the Address Bar's autocomplete history dropmarker image. */
#urlbar > .autocomplete-history-dropmarker {
list-style-image: none !important;

/* Remove the Search-Go button.
* (Use with the Stylized search bar only.) */
.search-go-button {
visibility: hidden !important;

#content .tabbrowser-strip * {font-size: 10px !important;}
.tabbrowser-tab * {height: 20px !important;}
.tabs-alltabs-stack {height: 24px !important;}


/* Change cursor for links that open in new window */
:link[target="_blank"], :visited[target="_blank"],
:link[target="_new"], :visited[target="_new"] {
cursor: crosshair;

/* Change cursor for JavaScript links */
a[href^="javascript:"] {
cursor: move;

/* denote mailto: links */
a[href^="mailto:"] {
color: #154766 !important;
text-decoration: underline !important;

Never really saw much difference in how Ff2 and Ff3 ran.

H_TeXMeX_H 07-01-2009 03:25 AM

I added how to remove the "Recently closed windows" option in FF 3.5. It seems every time a new version of FF comes out they add one more thing that I have to disable. I have absolutely no use for this option and it's in the same place where "recently closed tabs" was ... pisses me off a lot. Anyway there's a way to get rid of it, luckily.

chickenlinux 07-12-2009 11:49 AM

Best guide yet!

H_TeXMeX_H 07-12-2009 01:18 PM

Glad I could help, if you know of some more useful tweaks I'll add them to the list if you want. Personally what I wanted was just a place which had one comprehensive list of tweaks (useful ones), and I couldn't find one, so I'm trying to make one.

catkin 08-09-2009 05:12 AM

To suppress all the top menu items in the Bookmarks menu, add these lines to userChrome.css

#bookmarksMenuPopup > menuitem[command="Browser:AddBookmarkAs"],
#bookmarksShowAll, #organizeBookmarksSeparator,
#bookmarksMenuPopup > menuitem[command="Browser:BookmarkAllTabs"],
  display: none !important;

To keep "Bookmark this page" and "Organize Bookmarks"

#bookmarksMenuPopup > menuitem[command="Browser:BookmarkAllTabs"],
  display: none !important;

Tested on Firefox 3.0.11 and 3.5.2 (on WXP). Source of info: Mozilla Support Forum thread

catkin 08-09-2009 05:26 AM

To stop Firefox contacting Google to vet every URL, change these about:config settings

browser.safebrowsing.enabled: false
browser.safebrowsing.malware.enabled: false
browser.safebrowsing.remoteLookups: false

GrapefruiTgirl 08-10-2009 12:48 PM


Thanks to everyone contributing in here, as it's VERY handy to have all this stuff in one place, saving all the Googling and overlap produced by said Googling.

Great :)

PS - It seems that ONE MEASLY THING I really miss, has been removed from FF-3.5.x, and that is/was when clicking a bookmark, I had it open in a new tab (by Left Click) whereas now, it apparently can only be done by middle-click. Surely I'll get used to it, but I still get miffed when I click a bookmark and it loads in the current tab :/

GrapefruiTgirl 08-11-2009 09:04 PM

The above is (one of?) the main itemized, alphabetized lists of a giant whack of about:config entries. I didn't see it listed above, so there it is :)

I had already done a lot of this stuff on all previous Firefoxes. This time, Imma save my prefs.js file (I think that's the file -- don't quote me) for use with future versions, and/or for total crashes in which it might get lost, or whatever.

BTW - Been going through the links and suggestions above, as well as following links FROM those links, and must by now be getting pretty near tweaked out -- and I must say, when I first installed Slack64-current, therefore using for the first time Firefox 3.5.x, I found it acted like a bloated, half-dead sea-cow. But now, it's almost like it's got broadband behind it!! Zoom!!! Works GREAT :)

Thanks again to all contributors, and to H_TeXMeX_H for starting/creating this one-stop-about:config-shop here.


All times are GMT -5. The time now is 07:22 AM.