Speed up page display Some of the more recent Firefox customizations I've examined are ways to speed up the rendering of Web pages. The settings to do this are a little arcane and not terribly self-explanatory, but with a little tinkering, you can often get pages to pop up faster and waste less time redrawing themselves. Start rendering pages faster Creating an nglayout.initialpaint.delay integer preference lets you control how long Firefox waits before starting to render a page. If this value isn't set, Firefox defaults to 250 milliseconds, or 0.25 of a second. Some people report that setting it to 0 -- i.e., forcing Firefox to begin rendering immediately -- causes almost all pages to show up faster. Values as high as 50 are also pretty snappy. Reduce the number of reflows When Firefox is actively loading a page, it periodically reformats or "reflows" the page as it loads, based on what data has been received. Create a content.notify.interval integer preference to control the minimum number of microseconds (millionths of a second) that elapse between reflows. If it's not explicitly set, it defaults to 120000 (0.12 of a second). Too many reflows may make the browser feel sluggish, so you can increase the interval between reflows by raising this to 500000 (500,000, or 1/2 second) or even to 1000000 (1 million, or 1 second). If you set this value, be sure to also create a Boolean value called content.notify.ontimer and set it to true. A page A page "reflowing" while loading in Firefox. Control Firefox's 'unresponsive' time When rendering a page, Firefox periodically runs a little faster internally to speed up the rendering process (a method Mozilla calls "tokenizing"), but at the expense of being unresponsive to user input for that length of time. If you want to set the maximum length of time any one of these unresponsive periods can be, create an integer preference called content.max.tokenizing.time. Set this to a multiple of content.notify.interval's value, or even the same value (but higher is probably better). If you set this to something lower than content.notify.interval, the browser may respond more often to user input while pages are being rendered, but the page itself will render that much more slowly. If you set a value for content.max.tokenizing.time, you also need to create two more Boolean values -- content.notify.ontimer and content.interrupt.parsing -- and set them both to true. Control Firefox's 'highly responsive' time If Firefox is rendering a page and the user performs some kind of command, like scrolling through a still-loading page, Firefox will remain more responsive to user input for a period of time. To control how long this interval is, create an integer preference called content.switch.threshold. Hacking Firefox The secrets of about:config * Before you begin * Speed up page display * Have tabbed browsing your way * Make the user interface behave * Hack network connections * Stop memory hogging This is normally triple the value of content.notify.interval, but I typically set it to be the same as that value. Set it to something very low -- say, 10000 (10,000 microseconds) -- and the browser may not respond as snappily, but it may cause the rendering to complete more quickly. If you haven't already created the Boolean values content.notify.ontimer and content.interrupt.parsing and set them both to true in conjunction with content.max.tokenizing.time, you'll need to do so to make content.switch.threshold work properly. If you are more inclined to wait for a page to finish loading before attempting to do anything with it (like scroll through it), you can set content.max.tokenizing.time to a higher value and content.switch.threshold to a lower value to allow Firefox to finish rendering a page faster at the expense of processing user commands. On the other hand, if you're the kind of person who likes to scroll through a page and start reading it before it's done loading, you can set content.max.tokenizing.time to a lower value and content.switch.threshold to a higher one, to give you back that much more responsiveness at the cost of page-rendering speed.

Hacking Firefox: The secrets of about:config

Discover more than 20 behind-the-scenes tweaks for speeding up page loads, reducing memory drain and making the interface behave the way you want it to

By Serdar Yegulalp
May 29, 2007 12:00 PM ET
Computerworld - Ever since its debut, Firefox has garnered a reputation for being an enormously customizable program, both through its add-on architecture and its internal settings. In fact, many of Firefox's settings aren't exposed through the Tools > Options menu; the only way to change them is to edit them manually. In this article, we'll explore some of the most useful Firefox settings that you can change on your own and that aren't normally available through the program's graphical interface.
The closest analogy to how Firefox manages its internal settings is the Windows Registry. Each setting, or preference, is given a name and stored as a string (text), integer (number) or Boolean (true/false) value. However, Firefox doesn't keep its settings in the registry, but in a file called prefs.js. You can edit prefs.js directly, but it's often easier to change the settings through the browser window.
Type about:config in the address bar and press Enter, and you'll see all the settings currently enumerated in prefs.js, listed in alphabetical order. To narrow down the hundreds of configuration preferences to just the few you need, type a search term into the Filter: bar. (Click the Show All button or just clear the Filter: bar to get the full list back again.)
The about:config page.

The about:config page. (Click for larger view.)
To edit a preference, double-click on the name and you'll be prompted for the new value. If you double-click on an entry that has a Boolean value, it'll just switch from true to false or vice versa; double-click again to revert to the original setting. Not all changes take effect immediately, so if you want to be absolutely certain a given change is in effect, be sure to close and reopen Firefox after making a change.
Editing a preference.

Editing a preference. (Click for larger view.)
Note that not every setting in about:config exists by default. Some of them have to be created manually. If you want to add a new preference, right-click somewhere on the page and select New, then select the type of item to create (String, Integer or Boolean) and supply the name and value.

Before you begin

Here are a few caveats to keep in mind as you explore and tweak:
Not everyone will get the same benefits by enabling these tweaks. This is especially true for changing the network settings. If you habitually visit sites that don't allow a large number of connections per client, for instance, you won't see much benefit from raising the number of connections per server.
Some hacks may have a limited shelf life. With each successive release of Firefox, the need for tweaking any of the performance-related config settings (like the network settings) may dwindle as Firefox becomes more self-tuning based on feedback from real-world usage scenarios. In short, what works now may not always work in the future -- and that might not be a bad thing.



 
Keep a log of everything you change, or make backups. If you tweak something now and notice bizarre activity in a week, you'll want to be able to track back to what was altered and undo it. Firefox does show which about:config changes have been set manually, but this isn't always the most accurate way to find out what you changed. To make a backup of your preferences in Firefox, just make a copy of the file prefs.js, which is kept in your Firefox profile folder. If you mess something up, you can always copy this file back in. (Be sure to shut down Firefox before making a copy of prefs.js or moving a copy back into the profile folder!)
In Windows XP, the profile folder is
\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\<profile ID>.default\
In Windows Vista, this folder is
\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile ID>.default\
Note that Application Data and AppData are hidden folders by default, so they may not show up unless you force Explorer to show hidden objects. (Open the Control Panel, double-click Folder Options, select the View tab, select "Show hidden files and folders" and click OK.)
In Mac OS X, the profile folder is
<username>/Library/Application Support/Firefox/Profiles/<profile ID>.default/
and in Linux it's
~/.mozilla/firefox/<profile ID>.default/
but on those platforms it's usually quicker simply to search for prefs.js.
Alternatively, you can use the handy Firefox Extension Backup Extension (FEBE). It backs up not only the prefs.js file but just about every other thing in Firefox -- extensions, themes, cookies, form history and so on.

0 comments:

Post a Comment

 
2011 Redoon blog | Blogger Templates for Over 50 Chat | Distributed by Blogger Blog Templates Sponsors: Short People Club, Michigan Mechanical Engineer Jobs, California Dietitian Jobs