Vous êtes sur la page 1sur 10

Firefox Tweaks - ArchWiki

https://wiki.archlinux.org/index.php/Firefox_Tweaks

Home Packages Forums Wiki Bugs AUR Download

Firefox Tweaks
From ArchWiki

Contents
1 Performance 1.1 Tunables 1.1.1 Network settings 1.1.2 Turning off anti-phishing 1.1.3 Improve rendering by disabling pango 1.2 Foreign modifications 1.2.1 Reduce load time by compressing the Firefox binary with upx 1.2.2 Defragment the profile's SQLite databases 1.2.2.1 Sample size differences comparison 1.2.2.2 Profile defragmentation procedure 1.2.3 Cache the entire profile into RAM via tmpfs 2 Appearance 2.1 Fonts 2.1.1 DPI 2.1.2 Default font settings from MS Windows 2.2 General UI CSS settings 2.2.1 Change UI font 2.2.2 Hide button icons 2.2.3 Hiding various tab buttons 2.2.4 Horizontal tabs 2.3 Web content CSS settings 3 Miscellaneous 3.1 Viewing PDF/PS inside Firefox 3.2 Wheel mouse scroll speed 3.3 Change the order of searchplugins list

Summary Firefox configuration and modifications Related Browser Plugins: Acquiring and installing plugins such as Flash Firefox: Installing and troubleshooting the Firefox browser and plugins Speed-up Firefox using tmpfs: Caching the profile in RAM

1 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki

https://wiki.archlinux.org/index.php/Firefox_Tweaks

3.4 How to open a *.doc automatically with abiword or open office 3.5 Secure DNS with DNSSEC validator 4 Resources

Performance
Improving Firefox's performance is divided into parameters that can be inputted while running Firefox or otherwise modifying its configuration as intended by the developers, and advanced procedures that involve foreign programs or scripts.

Tunables
Improvements stemming from native Firefox settings. Network settings References: Mozillazine (http://forums.mozillazine.org/viewtopic.php?t=53650) All settings can be adjusted by browsing to about:config. Values for connections (HTTP, proxy, etc.) should be tweaked based on connection. These are the values for a 1.5Mb cable connection: Key network.http.pipelining network.http.proxy.pipelining network.http.pipelining.firstrequests network.http.pipelining.maxrequests content.notify.backoffcount content.interrupt.parsing content.max.tokenizing.time content.notify.interval content.notify.ontimer content.switch.threshold nglayout.initialpaint.delay Value true true true 8 5 true Description enable pipelining for normal connections enable pipelining for proxy connections enable pipelining of first requests maximum HTTP requests per pipeline number of initial reflows during rendering enable interruption of parsing to return to the application's event loop time steps for the initial reflows (content.notify.backoffcount) enable timer based reflows time before inital page reflow

2250000 time after which parsing is interrupted 750000 true 0

750000 keep same as content.notify.interval

2 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki

https://wiki.archlinux.org/index.php/Firefox_Tweaks

network.http.max-connections network.http.max-connectionsper-server network.http.max-persistentconnections-per-proxy network.http.max-persistentconnections-per-server browser.cache.memory.capacity network.dns.disableIPv6 Turning off anti-phishing

48 24 16 8 65536 true

number of total HTTP connections maximum number of any type of connections per server maximum number of keep-alive type connections per proxy maximum number of keep-alive type connections per server size of memory to use as cache - set as big as you can for normal operation disables IPv6 support - may not work for all networks, some report speed increase

Note: Deleting files from your profile folder is potentially dangerous, so it's recommended that you make a backup of the folder first. The anti-phishing features of Firefox may cause Firefox to become slow to start or exit, and might also affect the browsing speed since Firefox apparently contacts google for every http request. The problem is that Firefox maintains a sqlite database that might grow quite big, and reading and writing to this database begins to take some time when it grows bigger. If you feel that you don't need Firefox to tell you which sites may be suspect you can disable this feature: Turn off the following options under the security tab in preferences: "Tell me if the site I'm visiting is a suspected Attack site" and "Tell me if the site I'm visiting is a suspected forgery". Delete all files beginning with urlclassifier in your profile folder (~/.mozilla/firefox /********.default where ******** is some combination of letters and numbers. Default might be something else if you have created a non-default profile). Some of these files might be recreated by Firefox, but they won't grow any larger than their initial size:
$ rm -i ~/.mozilla/firefox/*.default/urlclassifier*

Improve rendering by disabling pango Note: Exporting the setting may also fix font issues for the entire Mozilla suite. Add:

3 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki

https://wiki.archlinux.org/index.php/Firefox_Tweaks

export MOZ_DISABLE_PANGO=1

to ~/.profile and relogin for the change to take place.

Foreign modifications
Advanced Firefox alterations Reduce load time by compressing the Firefox binary with upx Install the upx
# pacman -S upx

(http://www.archlinux.org/packages/?q=upx)

package:

Make a backup of the firefox binary:


# cp /usr/lib/firefox-5.0/firefox-bin /usr/lib/firefox-5.0/firefox-bin_backup

Invoke upx, applying a compression level of 9:


# upx -9 /usr/lib/firefox-5.0/firefox-bin

Defragment the profile's SQLite databases Warning: This procedure may damage the databases in such a way that sessions are not saved properly.
Sample size differences comparison

SQLite DB places.sqlite

Size Before Size After % change 30 M 2.4 M 19 % 85 % 16 M

urlclassifier3.sqlite 37 M

Profile defragmentation procedure

Firefox 3.0, bookmarks, history, passwords are kept in SQLite databases. SQLite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks and history related

4 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki

https://wiki.archlinux.org/index.php/Firefox_Tweaks

tasks is to defragment and trim unused space from these databases. Run sqlite3 vacuum and reindex commands in the profile directory. Example:
$ cd ~/.mozilla/firefox/*.default $ for i in urlclassifier3 places; do \ sqlite3 $i.sqlite vacuum; \ sqlite3 $i.sqlite reindex; \ done

To automate the process for all the databases in all the profiles directory, use the following:
$ find ~/.mozilla -name \*.sqlite -exec sqlite3 {} vacuum \; -exec sqlite3 {} reindex \; \ \

Cache the entire profile into RAM via tmpfs If the system has memory to spare, tmpfs can be used to cache the entire profile directory, which might result in increased Firefox responsiveness.

Appearance
Fonts
See also: Font Configuration DPI Modifying the following value can help improve the way fonts looks in Firefox if the system's DPI is below 96. Firefox, by default, uses 96 and only uses the system's DPI if it is a higher value. To force the system's DPI regardless of its value, type about:config into the address bar and search for layout.css.dpi. Change it to 0. Default font settings from MS Windows Below are the default font preferences when Firefox is installed in Microsoft Windows. Many web sites use the Microsoft fonts.
Proportional: Serif Size (pixels): 16 Serif: Times New Roman Sans-serif: Arial

5 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki


Monospace: Courier New Size (pixels): 13

https://wiki.archlinux.org/index.php/Firefox_Tweaks

General UI CSS settings


Firefox's UI can be modified by editing the files in
~/.mozilla/firefox/RANDOMHASH.PROFILENAME/chrome/;

namely, userChrome.css and userContent.css.

All of the following modifications take place in userChrome.css. Change UI font The setting effectively overrides the global GTK2+ font preferences, and does not affect the body; only the UI itself:
* { font-family: "FONT_NAME"; }

Hide button icons Enables text-only buttons:


.button-box .button-icon { display: none; }

Hiding various tab buttons These settings hide the arrows that appear to the horizontal edges of the tab bar, the button that toggles the "all tabs" drop-down list, and the plus sign button that creates a new tab.
/* Tab bar */ .tabbrowser-strip *[class^="scrollbutton"] { /* Hide tab scroll buttons */ display: none; } .tabbrowser-strip *[class^="tabs-alltabs"] { /* Hide tab drop-down list */ display: none; } .tabbrowser-strip *[class^="tabs-newtab-button"] { /* Hide new-tab button */ display: none; }

6 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki

https://wiki.archlinux.org/index.php/Firefox_Tweaks

Horizontal tabs To place the tab bar horizontally stacked along the sides of the browser window:
/* Display the tabbar on the left */ #content > tabbox { -moz-box-orient: horizontal; } .tabbrowser-strip { -moz-box-orient: vertical; /* * You can set this to -moz-scrollbars-vertical instead, * but then the scrollbar will *always* be visible. this way * there is never a scrollbar, so it behaves like the tab bar * normally does */ overflow: -moz-scrollbars-none; } .tabbrowser-tabs { -moz-box-orient: horizontal; min-width: 20ex; /* You may want to increase this value */ -mox-box-pack: start; -moz-box-align: start; } .tabbrowser-tabs > hbox { -moz-box-orient: vertical; -moz-box-align: stretch; -moz-box-pack: start; } .tabbrowser-tabs > hbox > tab { -moz-box-align: start; -moz-box-orient: horizontal; }

Web content CSS settings


In userContent.css you can add custom css rules for web content. Examples:
/* import other css file */ @import url("./imports/some_file.css"); /* block ads */ *[class*="advertisement"], *[class*="partners"], *[class*="sidebaner"], *[class*="banner"], *[class*="adview"], *[class*="promo"], *[class*="ad_"], *[name*="werbung"], *[name*="banner"], *[id*="banner"], *[id*="ad_"], iframe[src*="euroclick.com"],

7 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki


iframe[src*="/partners/"], iframe[src*="/adview"], img[src*="euroclick.com"], img[src*="/partners/"], img[src*="/adview"], embed[src*="Banner"], embed[src*="banner"], a:link[href*="euroclick.com"], a:link[href*="/partners/"], a:link[href*="/adview"] { display: none !important } /* domain specific rule */ @-moz-document domain(example.com){ div#header{background-image:none !important} } /* add '[pdf]' next to to pdf links a[href$=".pdf"]:after { font-size: smaller; content: " [pdf]"; } */

https://wiki.archlinux.org/index.php/Firefox_Tweaks

Miscellaneous
Viewing PDF/PS inside Firefox
if you don't want for some reason install Adobe Acrobat Reader for exploiting the feature to see PDF inside Firefox, you can use other software, like Evince (default viewer in GNOME) for example if you want to use evince for opening a pdf/ps or any other document supported by evince, inside firefox, and not to open a new window, this is possible and you just follow this simple instructions: install mozplugger (in this moment is in AUR) and evince (in extra) delete ~/.mozilla/firefox/*.default/pluginreg.dat (as mentioned after mozplugger installation) edit /etc/mozpluggerrc: find the line containing "pdf" word, after "GV()" edit evince line as below:
#repeat noisy fill exits: evince "$file" repeat noisy swallow(evince) fill: evince "$file"

Note: you must place comments at the very beginning of the line to avoid errors finally close (if not yet) and reopen firefox (now you can see a new plugin called mozplugger)

8 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki

https://wiki.archlinux.org/index.php/Firefox_Tweaks

try to open a pdf sample old forum instruction deprecated "http://ubuntuforums.org/showthread.php?t=25685" Note: this method works also with other pdf viewer, trying to change "evince" with the other program.

Wheel mouse scroll speed


To modify the default values (i.e. speed-up) of the wheel mouse scroll speed, type the following into Firefox's address bar:
about:config

Now enter the following into the 'filter' dialog: mousewheel.withnokey Double-click the entry entitled, mousewheel.withnokey.sysnumlines and thereby setting its value to false Double-click the entry entitled, mousewheel.withnokey.numlines and enter the desired number of lines per movement into the box (12, for example). Restart firefox for this setting to take effect. Alternatively you can install SmoothWheel add-on (http://smoothwheel.mozdev.org/) .

Change the order of searchplugins list


You can now (in Firefox 3) change the order in the GUI: Open the dropdown list of search engines and click Manage Search Engines Highlight the Engine you want to move and use Move Up or Move Down to move it.

How to open a *.doc automatically with abiword or open office


Click through the following menus: Edit Preferences File types Manage Select the doc extension Select Open them with this application Select /usr/bin/abiword or /usr/bin/soffice

9 of 10

28/08/11 21:19

Firefox Tweaks - ArchWiki

https://wiki.archlinux.org/index.php/Firefox_Tweaks

There is also a plugin/addon called mime edit. This addon will let you edit the mime types for firefox.

Secure DNS with DNSSEC validator


You can enable DNSSEC support for safer browsing.

Resources
http://www.mozilla.org/support/firefox/tips Retrieved from "https://wiki.archlinux.org/index.php/Firefox_Tweaks" Category: Web Browser (English) This page was last modified on 16 August 2011, at 05:34. Content is available under GNU Free Documentation License 1.2.

10 of 10

28/08/11 21:19

Vous aimerez peut-être aussi