Tips & Tricks
This page contains various tips and tricks for Firefox. Most of these tips involve editing of text files on your hard drive and is not recommended if you're not familiar with basic file and folder usage. The tips are divided into four categories and sorted by importance/popularity.
Contents
- Browser Appearance
- Use Windows Classic (9x/Me/2000) styled menus
- Use your own background image for the toolbars
- Don't use bold text on the active tab
- Customize the display and location of the close tab button in the tab bar
- Remove items from the main menu
- Remove extra padding from the Navigation Toolbar
- Change the window icon
- Display Sidebar on the right
- Change the width of the Search Bar
-
Browser Behavior
- Open external links in new windows or the current tab
- Decide which New Windows to Block
- Tweak Find As You Type
- Disable Other JavaScript Window Features
- Use your Netscape 6/7 or Mozilla bookmarks in Firefox
- Change the search mode in the address field
- Disable Bookmark Icons
- Prevent sites from disabling the context menu
- Web Page Appearance
- Other Tips
Browser Appearance
If you want the menus to appear native to the Windows Classic appearance, add the following code to your userChrome.css file:
/* Windows Classic (9x/Me/2000) style Menus */ menupopup, popup { border: 2px solid !important; -moz-border-top-colors: ThreeDLightShadow ThreeDHighlight; -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow; -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow; -moz-border-left-colors: ThreeDLightShadow ThreeDHighlight; padding: 1px !important; } menubar > menu[disabled="true"] { border: 1px solid transparent !important; } menubar > menu[_moz-menuactive="true"] { border-top: 1px solid ThreeDHighlight !important; border-right: 1px solid ThreeDShadow !important; border-bottom: 1px solid ThreeDShadow !important; border-left: 1px solid ThreeDHighlight !important; background-color: transparent !important; color: MenuText !important; } menubar > menu[_moz-menuactive="true"][open="true"] { border-top: 1px solid ThreeDShadow !important; border-right: 1px solid ThreeDHighlight !important; border-bottom: 1px solid ThreeDHighlight !important; border-left: 1px solid ThreeDShadow !important; }
- Use your own background image for the toolbars
In addition to changing themes, you can personalize Firefox even more by using your own toolbar background image. Add the following code to your userChrome.css file:
/* Use a background image for the toolbars: (Substitute your image file for background.gif) */ menubar, toolbox, toolbar, .tabbrowser-tabs { background-image: url("background.gif") !important; background-color: none !important; }
It's easiest to place the image file in the same location as the userChrome.css file. The image can be of any image format supported by Firefox.
- Don't use bold text on the active tab
If you don't want the title of the active tab to be bold, add the following code to your userChrome.css file:
/* Make the active tab not bold */ tab[selected="true"] { font-weight: normal !important; }
- Customize the display and location of the close tab button in the tab bar
You can customize the display and location of the close tab button in the tab bar by using about:config to edit the preference browser.tabs.closeButtons. Values:
- 0
- Display a close button on the active tab only
- 1
- (Default) Display close buttons on all tabs
- 2
- Don't display any close buttons
- 3
- Display a single close button at the end of the tab bar (Firefox 1.x behavior)
Some people like to place all their toolbar items on the same row as the menu. In order to save horizontal space, you can remove top menu items that you don't use. Add the following code to your userChrome.css file:
/* Remove the Go and Help menus Id's for all toplevel menus: file-menu, edit-menu, view-menu, go-menu, bookmarks-menu, tools-menu, helpMenu */ #go-menu, #helpMenu { display: none !important; }
- Remove extra padding from the Navigation Toolbar
This tip will make the toolbars use less space around the buttons, allowing Firefox to use more space for the actual web pages. This also affects additional toolbars such as the Googlebar. Add the following code to your userChrome.css file:
/* Remove extra padding from the Navigation Bar */ .toolbarbutton-1, .toolbarbutton-menubutton-button { padding: 2px 3px !important; } .toolbarbutton-1[checked="true"], .toolbarbutton-1[open="true"], .toolbarbutton-menubutton-button[checked="true"], .toolbarbutton-menubutton-button[open="true"] { padding: 4px 1px 1px 4px !important; }
- Change the window icon
You can change Firefox's default window icon to any icon you want, by following these steps:
- Go to the folder you installed Firefox in (e.g.
C:\Program Files\Mozilla Firefox\
) and then go to the subfolder chrome. - While in
chrome
, create a new subfolder calledicons
, then go to that folder and create yet another subfolder calleddefault
. The full path to this folder could be C:\Program Files\Mozilla Firefox\chrome\icons\default\. - Choose the icon you want to use (on Windows use .ico files, on Linux use
.xpm files) and then place it in this folder and rename it to
main-window.[ext]
, e.g.main-window.ico
on Windows andmain-window.xpm
on Linux.
In addition to the main window, you can also change the icon on the Bookmark Manager and JavaScript Console. The icon names are
bookmark-window.[ext]
andjsconsoleWindow.[ext]
, respectively.After this is done, restart Firefox and you should be able to see your chosen icon in the title of the browser windows.
- Go to the folder you installed Firefox in (e.g.
To display the Sidebar on the right side of the window instead of the left, add the following code to your userChrome.css file:
/* Place the sidebar on the right edge of the window */ hbox#browser { direction: rtl; } hbox#browser > vbox { direction: ltr; }
- Change the width of the Search Bar
By default, the Search bar on the toolbar is relatively small. To specify your own width in pixels, add the following code to your userChrome.css file:
/* Make the Search box flex wider (in this case 400 pixels wide) */ #search-container, #searchbar { max-width: 400px !important; width: 400px !important; }
Browser Behavior
- Open external links in new windows or the current tab
The
New pages should be opened in:
setting in Tools > Options... > Tabs applies to links both from the current page and links triggered from other programs. If you want all links from other programs to be opened differently from links in the current page, you can use about:config to edit the preference browser.link.open_external. The values are:- 1
- Open links from other programs in the current tab
- 2
- Open links from other programs in new windows
- 3
- (Default) Open links from other programs in new tabs in an existing window
- Decide which New Windows to Block
By default, all windows that a web page wants to open will be diverted to either the current tab/window or a new tab. However, this does not apply to small pop-up windows (e.g. a poll results window or the ICQ window in go.icq.com). To change this behavior so it does divert new windows that are spawned by JavaScript, use about:config to edit the preference browser.link.open_newwindow.restriction. Values:
- 0
- Divert all new windows to current tab/window or new tab
- 1
- Don't divert any windows spawned by JS
- 2
- (Default) Don't divert JS windows that include size/placement/toolbar info
- Tweak Find As You Type
Find As You Type has a few hidden preferences that can be changed to better fit your needs. Use about:config to change any of the following:
- accessibility.typeaheadfind.linksonly
- Set this pref to false if you want Find As You Type to search normal text too.
- accessibility.typeaheadfind.startlinksonly
- Set this pref to true if you require that the link starts with the entered text.
- accessibility.typeaheadfind.timeout
- This is the time in milliseconds for the Find As You Type to stop watching for keystrokes.
For information about what Find As You Type is, read the documentation.
- Disable Other JavaScript Window Features
Firefox has a few options that allow you to decide what scripts can and can not do with windows. These options are available by going to Tools > Options... > Content, and beside "Enable JavaScript", clicking on . However, this list of options doesn't cover them all. There are some other useful options which can be applied by using about:config to change the following:
- dom.disable_window_open_feature.resizable
- Set this to true to make sure all pop-up windows are resizable.
- dom.disable_window_open_feature.minimizable
- Set this to true to make sure all pop-up windows are minimizable.
- dom.disable_window_open_feature.menubar
- Set this to true to always display the menu in pop-up windows.
- dom.disable_window_open_feature.location
- Set this to true to always display the Navigation Toolbar in pop-up windows.
- dom.disable_window_open_feature.scrollbars
- Set this to true to prevent sites from disabling scrollbars.
- Use your Netscape 6/7 or Mozilla bookmarks in Firefox
If you are using Netscape 6/7 or Mozilla, you can share your bookmarks with Firefox. All bookmarks are stored in a file called
bookmarks.html
and is stored in the profile folder. For example, if you want to use the bookmarks for Netscape 7 in Firefox, use about:config to add the String preference browser.bookmarks.file, and set the value to C:\Path To Netscape Profile\bookmarks.html.Replace
Path To Netscape Profile
with the actual path to your Netscape profile.This tip can also be used on dual-boot systems to use the same bookmarks on both operating systems. Just make sure that you place the file on a location that you have write access to from operating systems.
- Change the search mode in the address field
By default, if you enter a search term in the address field and press Enter, a Google "I'm Feeling Lucky" search is performed, and you're taken to the first result of that search directly. If you prefer to see the standard search result list instead, use about:config to change the value of the preference keyword.URL to http://www.google.com/search?btnG=Google+Search&q=.
Of course, you could also change to a completely different search engine by changing the string to something else. The default search string is: "http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=".
- Disable Bookmark Icons
You can disable the display of bookmark icons and "favicons" by using about:config to set both of the preferences browser.chrome.site_icons and browser.chrome.favicons to false.
Some sites prevent you from right-clicking on the page to show the context menu. To disable such attempts, go to Tools > Options... (Firefox > Preferences... on Mac OS X, and Edit > Preferences... on Linux), click the Content section, and then click the button next to Enable JavaScript. In the Advanced JavaScript Settings window, uncheck Disable or replace context menus and click .
Web Page Appearance
- Disable blinking elements
You probably just find the blinking above annoying. To stop it, use about:config to change the value of the preference browser.blink_allowed to false.
- Disable <marquee> tags
Some sites using scrolling marquee tags. If you don't find them useful, add the following code to your userContent.css file:
/* Stop those <marquee> tags! */ marquee { -moz-binding : none !important; display : block; height : auto !important; }
- Force frames to be resizable
Many sites use frames to display their contents, and sometimes the frames are too small. To force all frames to be resizable, use about:config to change the value of the preference layout.frames.force_resizability to true.
Note that this will also make the frames appear with a fixed-width border and thus, may make the pages look funny.
- Change the cursor for links that open in new window
This neat trick will change the mouse pointer when you hover it over links that will open a new window. Add the following code to your userContent.css file:
/* Change cursor for links that open in new window */ :link[target="_blank"], :visited[target="_blank"], :link[target="_new"], :visited[target="_new"] { cursor: crosshair; }
- Change the cursor for JavaScript links
This tip will change the mouse pointer when you hover it over links that will perform a JavaScript command. Add the following code to your userContent.css file:
/* Change cursor for JavaScript links */ a[href^="javascript:"] { cursor: move; }
Other Tips
- View web pages in your preferred language (if available)
Some web sites offer content in multiple languages. You can choose several languages in Firefox and they will be treated in order of priority. In order to change the priority, just go to Tools > Options... > Advanced, select the General tab, and under Languages, click the button.
- Run Firefox from removable media
This advanced tip makes it possible to run Firefox from removable media, such as a USB memory stick. This will allow you to run Firefox with your personal settings from any computer, even those that don't have Firefox installed. It has only been tested on Windows XP/2000. The basic instructions are as follows:
- Copy the Firefox application folder and your profile folder to the removable medium. In this
example we will use
R:\Firefox
for the application folder andR:\FFProfile
as the profile folder, assuming the drive letter for the removable media isR:
. - Create a simple batch file called
R:\Firefox.bat
with the following line:start \Firefox\firefox.exe -profile \FFProfile
- Optionally, disable the disk cache to reduce the amounts of file writes to the removable storage by using about:config to set browser.cache.disk.enable to false.
The reason why a batch file is needed instead of a simple shortcut is that a shortcut uses absolute paths, and since the actual drive letter for the removable media may change depending on which computer it is plugged into, the relative path used in the batch file is guaranteed to work anywhere.
- Copy the Firefox application folder and your profile folder to the removable medium. In this
example we will use
- Select and copy individual table cells
While holding down the Ctrl key, you can select table cells. Just click on any non-link portion of the cell. You can select multiple cells, either by clicking individually on the cells you want to select or by just dragging with the mouse. Once selected, you can use Copy and Paste just like you would on a text selection.
- Speed up page rendering
By default, Firefox doesn't try to render a web page for 250 milliseconds while it's waiting for data. If you use about:config to add the Integer preference nglayout.initialpaint.delay, and set the value to 0, Firefox immediately starts to display the page, even without complete data. The drawback, especially on slower machines, is that the total time to display the page will be longer.
- Enable Pipelining
Pipelining is an experimental feature, designed to improve page-load performance, that is unfortunately not well supported by some web servers and proxies. To try it out, by using about:config to set the following preferences:
- network.http.pipelining
- Set this to true, to enable pipelining.
- network.http.proxy.pipelining
- Set this to true, to enable pipelining to the proxy server.
- network.http.pipelining.maxrequests
- Set this to 8, to have a maximum of 8 pipelining requests at once. Possible values are from 1 to 8.
For more information about pipelining, read the HTTP/1.1 Pipelining FAQ.
- Specify where to store the cache
To specify in which folder the cache is stored, use about:config to add the String preference browser.cache.disk.parent_directory, and set the value to C:\Path To Cache.
Replace
Path To Cache
with the actual path to your cache folder.- Specify the memory cache usage
Normally, Firefox determines the memory cache usage dynamically based on the amount of available memory. To specify a specific amount of memory cache, use about:config to add the Intefer preference browser.cache.memory.capacity, and set the value:
- -1
- (default) Determine the amount of memory cache dynamically.
- 0
- None.
- n
- Memory capacity in kilobytes. For example: 4096.
To disable the memory cache completely, use about:config to set the preference browser.cache.memory.enable to false.
- View page source using an external program
If you want to view the HTML source of a web page using an external text editor instead of the built-in source viewer in Firefox, use about:config to set view_source.editor.external to true, and then set view_source.editor.path to e.g. C:\Windows\Notepad.exe or whatever is your preferred text editor.
Because of the use of <marquee>, this page does not validate as HTML 4.01 Strict.
© 2002-2004 David Tenser.