Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Optimising Firefox


Optimising Firefox

By ghostghost | 4609 Reads |
0     0

Optimising Firefox By 0rijin4l tris203(at)gmail.com

Introduction

‘Rediscover the Web’ was the slogan of Mozilla Firefox, when it was released in late 2004. Firefox is growing in popularity; with some surveys suggesting up to 15% of users chose Mozilla Firefox over such alternatives as Internet Explorer, Opera or Netscape. Internet explorer has so many exploits written for it, ranging from annoyances, Pop-Ups, Adverts, Viagra etc., to full out security flaws, such as back-door Trojans. Therefore many computer users have decided it can no longer be trusted. When you make the switch to Firefox you will notice the advantages it has over Internet explorer immediately, tabbed browsing, theme-ing, extensions, and countless security improvements in its design and coding. In this article I intend to look at Firefox extensions, this in genius system allows Firefox to become much more than just a web-browser!! (111oneoneone)

Establishing the Basics

There are four ways to look modify Firefox and the way it works

  1. Plug-Ins These are quite rare, people tend to download the first 5 or 6 they need (Flash, Quick time, etc.) and then never install another plug-in again.

  2. Search Engines This is adding more search engines to the search box in the top right hand corner of Firefox; this can be useful for a reference book, as it can be configured to search wikipedia, or an other encyclopaedia website. It also can be configured to use a search on a forum so that you could search before posting a topic asking for help, etc. (Which is always a good idea [/rant])

  3. Extensions These are nifty snippets of code, and there functions can ranging from, changing the name of firebox in the title bar of the windows (Fancy Using ‘Mozilla Psycho Whale’?), to completely changing the way something is used, tie, using your gmail (Google Mail) account as a back-up and personal FTP area.

  4. Editing Your About:Config page This really lets you get under the skin of Firefox and can be useful for tweaking settings to achieve maximum performance, or tweaks that are so small they don’t warrant and extension.

In this article I am going to look at the last two items on the list, Using and installing extensions and editing the About:Config page.

Firefox ships with no plug-ins or extensions installed and just the standard search engines, Google, Amazon etc. This is to keep download size small and too allow customizing without having first to remove any unwanted accessories.

Establishing the Not-So-Basics

Firefox ships with settings that only allow the installation of extensions from: http://update.mozilla.org http://addons.mozilla.org And your Local-Host (http://127.0.0.1)

If you try and install an extension from a non-trusted site, then Firefox will stop you, otherwise it will display a conformation dialogue, with an install now button, which will allow you to proceed to install the extension.

I would recommend not changing this unless you specifically trust the source if the extension. An extension allows new code to run on your computer, through Mozilla Firefox, therefore providing a possible gateway to the Internet for malicious hackers to exploit (;-)) (o_0). If you want to install an un-official extension from another website (not http://mozilla.org) then the best thing to download the extension onto your hardisk, it should be an ‘.xpi’ file. From there open Mozilla Firefox and select: File>Open File and select the appropriate file.

Firefox will usually need to be restarted for any extensions to take effect.

How It Works

Firefox is built on the XPI architecture. That acronym stands for Cross-Platform Installer. This allows other applications to utilize the Portable Run-Time system ad XUL interface contained within Firefox and use it to run themselves. It then can be distributed as an extension. And therefore provide and infinite amount of scope to enable new features into firebox, well beyond the usual capabilities of a web browser.

Because these programs do not modify Firefox they simply create links to themselves on start-up and are therefore able to launch themselves at the click of a button.

Essential Extensions

Many extensions are only a few kilobytes big and add one small change to your browser; in my experience these are the best type. They requite no learning of how to use them and exist only to make your surfing life easier. Following are a selection of my favourite extensions and how to use them to enable your browsing experience to be as easy as possible.

Flash-Block

Flash adverts are one of the most annoying things on the web, flash-block takes all flash animations found on the page and replaces them with a small Play button, and this significantly reduces the time taken to load pages as it only downloads flash animations as you decide to watch them. Flash block can be disabled for certain web sites (such as http://newgrounds.com), or other flash intensive websites.

Reveal

Reveal is a useful tool, as you visit sites it automatically takes screen shots of the websites and pages you visit, a quick press of [F2] and it brings up a visual trail of all the websites you have visited, a click on any of these thumb nails will take you back to that site.

FoXpose

If you are a tab-intensive user and often have more than 6 or 7 tabs open at once and often open windows while they load, meaning to go back to them later FoXpose is for you. A quick stroke of [F8] opens a new tab containing thumbnail previews of all the open tabs, which update as the individual tabs do. To activate the real tab, just click the thumbnail and the tab will open ready to work in that tab.

SessionSaver

This extension quietly saves the current layout and tabs of your browser when you close it, mean if you need to restart Firefox (If you have just installed a new extension or theme, or are applying an existing theme, or activating an existing extension) but don’t want to lose the 10 or 12 website that you have open in other tabs then you can use SessionSaver to make sure those tabs are active in the new Firefox window when you restart it. Even content in messages, forum messages, email text etc. will be restored.

FoxyTunes

This is simple extension that places a bar in the bottom right of your Firefox window, allowing you to control many of your favourite media players from within your Firefox window. It currently supports, Windows Media Player, iTunes, Winamp, RealPlayer, Juk, Amarok, RhythmBox to name but a few. This extension is very subtle and even allows you to configure which buttons you want shown.

StumbleUpon

An extension that goes by the name of stumble upon allows a certain community aspect to Firefox, as you can select a category that interests you it will randomly load a website that others have previously found and categorised. Selecting the ‘Bizarre’ category will take you to sites such as ‘The Evil Clown Generator’ and ‘BananaGuard’ (Where you can buy hard fruit-shaped cases to keep your fruit safe.

Chatzilla

This used to be shipped with the Mozilla suite, although after that was abolished it now has to be obtained separately. This adds an integrated IRC client into your Mozilla Firefox window, although it doesn’t have the power of the options of mIRC, it still supports aliases, DCC, basic scripting and sound support. Although as it shares most of Firefox’s code it is less than 300kb to download.

Sage

There are lots of good website around, and to check them all is very time-consuming allows you to subscribe to an RSS feed, which can be read in the side bar provided by Sage or can be clicked and Sage will compile a virtual page to display an images attributed to the story.

FireFTP

As you may have guessed from the name, this is an FTP client. Firefox comes with an FTP client pre-built FTP client, although this lacks stability and can be difficult to use, even in comparison to Internet Explorers in-built client. FireFTP will make this much easier providing an interface similar to that of cuteFTP or Filezilla. Another advantage is that it starts in a new Firefox tab, allowing you to easily switch between the website and FTP when creating a website, and combined with ReloadEvery (which I will outline later) can make the stress full job of creating a website much easier and quicker.

GooglePreview

This is a simple extension that includes a small thumbnail of the website next to the result in Google and some other search engines. This allows you to assess whether the website is relevant before you click it.

ReloadEvery

This is a simple extension to set a page so that it refreshes at a given interval, which can be anything from a couple of seconds to hours. This can be very useful when building a website, as you can upload files using FireFTP and use ReloadEvery to see how the changes are affecting the website.

Adblock Plus

This is an extension that disables and hides web adverts. It hides Google ads and most of those annoying (virus) 3D smileys adverts, and generally makes your browsing life much easier. And combined with Flash-Block it will stop 99.9% of germs web-ads and generally serves to block nearly all of the common web annoyances. It can be turned off and set to allow ads on a certain pages, domains, and servers, if having it enable is destructive to the page layout. Although I must say I rarely have to turn it off and it works with nearly 100% of pages.

Adblock Filterset.G Updater

This extension makes Adblock Plus update regularly and you can even configure it to suppress all messages so that it dose so almost silently. If you use Adblock Plus this extension is a must have, as it makes sure your Adblock filter lists stay up to date. Although it is unofficial (not affiliated with the main extension.) it still works incredibly well.

Add N Edit Cookies (ANE Cookies)

This is a very useful extension and is used to edit you cookies, using a very easy GUI. It is skinned with your Firefox skin and therefore integrates incredibly well. Gone are the days of JavaScript injecting your cookies. This can be very good for changing automagic log-ons and making sure that your cookies have been cleared, or appropriately scrambled.

Stealther

This extension doesn’t allow your browser to take information as you visit websites. It denies access to your cookies, cache, and disables JavaScript. It can be turned off and is used for when you want to your actions to be undetectable from prying eyes, if some one is able to log-on as you on your computer.

Tweaking the Settings

The ability to add extensions into Mozilla Firefox is one of the main reasons it is so popular. When the developers set out to build the open-source browser, they wanted to create bare-bones architecture that people to add to using well-established plug-in system.

Fortunately while trying to achieve this basic configuration they never lost sight of the need for the ability to exercise complete control over nearly every feature contained in the software. This may seem surprising to all the people that have ventured into the ‘Preferences’ and ‘Options’ windows. Those kinds of windows are very acceptable, if all you want to do is change your homepage or edit the available cache size. But if you want to get further under the skin of the Firefox configuration you need to enter the nitty gritty sections, where the underlying controls of Firefox really are. I will continue to explain how it is possible to change nearly everything about Firefox in this next section, although first we need to explain how it is possible and how it works.

URI’s

URI stands for ‘Uniform Resource Identifier’. URI’s are used to identify protocols and more commonly the location of resources on the web. You will be familiar with the URI’s for website and FTP connections like ‘http:’ and ‘ftp:’ (You may find this reminiscent of the way windows works and names your drives ‘C:’ ‘A:’). You can also use them for local resources such as ‘file:’ When it is used to refer to an internal protocol it is called an ‘Internal URI’ the ‘about:’ URI, is common to both Mozilla’s browsers and Opera’s browsers. And is the same on both Linux and Windows versions.

‘About:’

A simple entry of ‘about:’ on its own into the address bar will display information about the current release of the browser you are using. Although this particular Internal URI can be combined with other identifiers to refine and give extra meaning to the returned results.

Combing Internal URI’s

The ‘about:’ URI can be combined with many identifiers the most often used will be:

‘about:cache’ - This offers the most up-to-date information on what you cache is currently storing. Including the current memory and disk usage.

‘about:plugins’ - This will display the currently installed plug-ins (such as flash, QuickTime, and RealAudio Player) and their respective versions. This can be useful for establishing whether an update is necessary.

‘about:config’ - This is the whole reason I am talking about URI’s and how they work. When this is entered into the URL bar it will display hundreds of hidden parameters, which can be changed and tweaked to adjust the way Firefox looks and works. About from the filter search bar at the top, there is nothing apart from common sense (Which is often is wrong with the way these variables are named) to indicate what these parameters do, it is a little like the Windows’s® Registry or the Gnomes Gconfig database. The filter bar, which is the only obviously labelled item on the page, simply applies a real-time search to all the existing variables.

About ‘About:Config’

This is a library of loads of parameters for tweaking Firefox. Not only can you modify existing values you can add your own! The lists of parameters are sorted according to function, with a value attached to each variable. These values range from the normal Booleans (A true or false option) to integers, to strings (text and numbers). Double click each value to bring up an entry box where you can edit the value (Booleans just toggle between True and False). If you right-click in the list you can copy and paste values as well as create new ones. The peculiar thing with the about:config page is only registered values are listed. Anything else does not exist until it is created or set.

The Good Bit

If you enter ‘Browser’ into the filter bar, and look for ‘browser.cache.disk.parent.directory’. If you can’t find it, and with a normal Firefox installation it won’t be there, (For reasons I explained before), right click and select New>String (As this is the type of value it will hold) and enter the desired location for your cache. If you are using Linux then instead of using your home directory being clogged up by your cache try setting this to ‘/tmp’. Windows users can set it too a different directory. Unfortunately the list doesn’t update auto magically so you will need to hit return in the filter bar, to refresh the results.

Tuning values to do with the cache can greatly increase the performance. In general the more space given to the cache the better Firefox can store web pages and the quicker it will appear. Especially with pages cached to the RAM. If your machine has an abundance of RAM then try changing ‘browser.cache.memory.enable’ to larger value (In kilobytes’ for example 102400 for a 100mb RAM Cache. Then load a large (Try an image intensive page and see if you can see the difference.) In contrast if you are low in RAM try using a smaller value; it can be reduced to around 16mb (16384kb)

Enabling ‘network.http.pipelining’ can increase networking performance; this will allow Firefox to send multiple HTTP requests at the same time rather than one at a time. There are similar settings for proxy settings if you are using one.

Another important parameter is ‘nglayout.initialpaint.delay’ this is an integer and is the time (in milliseconds) Firefox waits before drawing a page. I’m sure you have all noticed how complex websites ‘jump about’ as they load. You may have thought that setting this to ‘0’ would increase loading times it won’t. Normally giving Firefox longer than the default 250ms will actually increase performance, meaning you get more than just the top banner to begin with.

With Linux the mouse wheel can be a little erratic when using Firefox. You can find these settings by filtering ‘mouse’. Then you can change the amount of text that scrolls with the wheel by changing ‘mousewheel.withnokey.numlines’. If you want to completely change the mouse behaviour then change the ‘action’ parameter to ‘1’ to scroll by a page, ‘2’ to move backwards and forwards between browser history, and ‘3’ to make the font size larger and smaller. These can be combined with the [Shift] and [Control] keys by looking for ‘withcontrolkey’ and ‘withshiftkey’ among variable names.

The way Firefox handles pop-ups can also be changed, for example you can change the yellow bar that appears at the top when Firefox successfully blocks a pop-up. If you change ‘privacy.popups.showBrowserMessage’ to false all you will get is a small icon in the status bar, much less intrusive.

Plug-ins can also be configured from here, filter on ‘plug-in’ and have a look at what comes up. ‘Adblock Plus’ (That I mentioned earlier can be configured from here. You can edit the settings for white and black listing adverts to block only the unwanted ones.

Quitting

But what happens when you quit, where do your preferences go? Well they are saved in a file called ‘prefs.js’. In Linux this is your profile directory, in windows it is ‘docu<i></i>ments And Settings’. You can find at ‘~/.mozilla/Firefox/random.default/’ for Linux, and just follow the trail of folders for windows. You cannot edit the file directory as when Firefox next opened and quitted it would overwrite it. Instead to make changes create a file called ‘user.js’ inside the same directory. Copy and paste the changes from ‘prefs.js’ and save the file. Firefox will never overwrite the ‘user.js’ file. This is perfect for sharing setting between friends when you find the perfect settings. And I’m sure I will post it up when I stop finding tweaks. ;-).

Conclusion

Well I hope you enjoy using your new tweaked and faster Firefox and thanks for sticking with me for all seven pages of this. I would like to thank mozzer for helping me write this (Didn’t help much though ;P.) and for proof reading it, so all typo’s and grammatical mistakes are entirely his fault ;P. PCPlus for being a great magazine and helping me with some of the facts of this article. Dave Hyatt and Blake Ross for making Firefox. Enigma group, (http://www.enigmagroup.org), for training me in hacking, (I eep it in my bookmarks in case it ever returns), for teaching me more. I also want to thank my iPod for entertaining me whilst I wrote this. My Dad for lending his laptop to me to type this up my computer is dead :(. Erm, yeah that’s it Thanks.

0rijin4l

Kthnxbi

Comments
ghost's avatar
ghost 18 years ago

ahem..it was a great article i should say.. may we know why double posting it after 6 months?!!!!

ghost's avatar
ghost 18 years ago

He posted that on his old account which doesn't work any more :(

ghost's avatar
ghost 18 years ago

yeah, posted on my old username, if you look at the signature on the old one it says 0rijin4l :ninja:

ghost's avatar
ghost 18 years ago

lol great article dude :)

ghost's avatar
ghost 18 years ago

Great article, thanks for those extension names (SessionSaver is wonderful)

ghost's avatar
ghost 18 years ago

bugger, just realised this one is under my old name too, hmmm, il contact an admin, and see it can be moved! :wow: