Chapter 9. Changing Preferences and Settings

First introduced with Firebird version 0.6, the about: facility enables you to view various settings and change preferences. There are a total of seven options:

  • about:—. Displays an about screen listing Firefox’s version information, as well as other useful information.

  • about:buildconfig—. Displays information about the actual build of Firefox. This shows which compiler options were used, as well as the target platform.

  • about:cache—. Lists information about the memory and disk cache. All the cached entries can be listed as well.

  • about:config—. Enables you to modify any of the Firefox preferences and create new preferences if desired.

  • about:credits—. Displays a list of all the people who have worked on Firefox and is retrieved from the Internet so that it is up-to-date.

  • about:Mozilla—. Shows an excerpt from The Book of Mozilla, 7:15.

  • about:plugins—. Shows information about all the plug-ins installed on the computer. Plug-ins are universal, not user specific like extensions are.

All except for about:config are read-only and do not allow changes. about:config can be used to change preferences for all parts of Firefox.

This chapter is primarily intended to show you how to use about:config. The other about: components are described here but not discussed in depth unless there is a relationship between them and about:config.

about:

The about: option, without any argument, displays a web page–like about screen. Although much of the information on this page is identical to the Firefox About box (accessed by selecting Help, About in the menu), the formatting is different. This screen contains a bit more information.

Figure 9.1 shows the results of about: in Firefox version 1.0.4. Other versions of Firefox might have slightly different information.

about: gives product version information and the browser identification string, which is sent to the web server when a page is requested.

Figure 9.1. about: gives product version information and the browser identification string, which is sent to the web server when a page is requested.

All browsers will send a string to the server telling the server of the type of browser. Virtually all reference Mozilla (even Internet Explorer) as a browser standard.

about:buildconfig

You can determine which compiler options were used when the current version of Firefox was built. These options include only nondefault options.

Figure 9.2 shows the buildconfig. Compiler options shown in this figure include

  • -TC—. This option specifies that the source is C (and not C++) code.

  • -TP—. This option specifies that the source is C++ (and not C) code.

  • -nologo—. This forces the compiler to not display a logo. This reduces the amount of screen clutter during compiling and building.

  • -W3—. This tells the compiler to display severe warnings, less severe warnings, and all other warnings recommended for production purposes.

  • -Gy—. This tells the compiler to use function-level linking.

  • -Fd—. This is used to rename the program database (PDB) file to the name defined in PDBFILE.

about:buildconfig lists compiler and build data, including configuration arguments.

Figure 9.2. about:buildconfig lists compiler and build data, including configuration arguments.

Configure arguments configure the final product, not the compiler. For example, --enable-extensions=cookies enables the cookie features.

One of the things the compiler information provides is the degree of optimization. This can be interesting if you are a developer and can build Firefox with maximum optimization.

about:cache

Firefox, like many programs, caches information both to memory and to the disk. This is done for performance reasons. With about:cache, you can see exactly what has been cached, and where.

Figure 9.3 shows the root cache statistics page. There are two subpages with additional information.

The root cache statistics page gives overall information. The links on this page are used to retrieve specific entries.

Figure 9.3. The root cache statistics page gives overall information. The links on this page are used to retrieve specific entries.

There are two subpages in about:cache. The first displays entries in the memory cache, whereas the second one displays entries in the disk cache. Both cache sizes can be configured using about:config (browser.cache.disk.capacity and browser.cache.memory.capacity).

about:config, Firefox’s Configuration Console

about:config is the most powerful way to set options, configuration settings, and preferences (let’s just use the term preferences from now on). It has a simple interface, has a search capability, and is capable of working with each of the preference data types.

It is an important feature of Firefox because it enables many preferences to be changed that might not easily be set. Certainly it lets you edit prefs.js (refer to Chapter 4, “Managing Profiles,” for more on prefs.js and user.js). However, about:config enables you to change settings while Firefox is running, right in the browser, making things much easier and more manageable.

This section covers about:config.

Chapter 4 briefly described about:config. In this section, we will examine about:config completely and give examples of how it can be used to modify preferences that are not otherwise accessible.

Back Up Before Disaster!

Prior to making any changes with about:config, it is vital that you make a backup of your configuration! If you change something that causes Firefox to act unpredictably or to crash, you need to have a way to recover.

All your alterable files are stored in your profile. This profile can be backed up in its entirety, or you can choose to only back up the critical components. I recommend a full backup of your profile because this enables you to quickly return to the state that Firefox was in when the backup was made.

First—and this is important—close Firefox! Firefox updates the profile when closing and does other housekeeping tasks. You want everything to be stable before backing up.

Take a look at Figure 9.4. In this figure my Firefox profile is named xrjy2cro.default. On May 17, I made two backup copies of this profile. Then on May 18, I made a new backup. To back up, I simply did a right button drag-and-drop and selected Copy Here from the pop-up prompt. (Don’t select Create Shortcuts Here because this will not make copies of any files in the profile!)

Drag and drop with the right button in Windows Explorer to make a copy of your profile.

Figure 9.4. Drag and drop with the right button in Windows Explorer to make a copy of your profile.

Windows won’t give me a name that I am happy with, so I renamed my backups using a date and other text to indicate when the backup was made and what the original filename or folder name was. An offline backup, such as to a CD-R or CD-RW disc, keeps this information safe in case of a major hardware failure.

Note

The previous example’s illustration is for Windows XP. If you are using another version of Windows or another operating system, refer to Chapter 4 for information about finding and backing up the profile.

Now, say I destroy my profile by doing something wrong in about:config. I can rename my original profile (in this case xrjy2cro.default) to a different name, saving it just in case the restore fails. Then I can copy—not rename—one of my backups to the original profile name. (I copy so that I don’t lose or overwrite my profile backup.)

A new or unused profile contains only a few files. As a profile is used, however, it quickly grows in size. Most of the growth is due to the disk cache. You can reduce the size of a profile by clearing the cache by selecting Tools, Options from the menu. Then click Privacy and click the Clear button next to Cache.

Caution

Extensions and themes are installed as part of a profile. When you restore a profile from a copy made before installing an extension or a theme, that extension or theme is inaccessible until it is reinstalled.

Of course, it is important to not restore any extension or theme that caused Firefox to fail!

Understanding the about:config Display

The about:config user interface is very simple (see Figure 9.5). Don’t be fooled, though; it is still powerful and its simplicity makes it easy to use.

about:config displays just like a web page in Firefox.

Figure 9.5. about:config displays just like a web page in Firefox.

In about:config is an edit box where you can enter a keyword, characters, or anything you want to filter by. A Show All button also appears in this box and is active whenever you have used a filter; this turns off the previous filter.

The data in about:config is arranged in four columns:

  • Preference Name—This is the name of the preference. Preferences are arranged in a hierarchal format using a period to separate each level of the hierarchy.

  • Status—This column indicates the status of the preference. The three status values are default for any preference that has never been modified by the user; user, which is set for a preference that has been set or changed by the user; and locked for a preference that is read-only. Notice that, after a preference has been changed one time and then reset to the default value, its status reverts to default.

  • Type—This column indicates the type of data the preference expects. Possible values include Boolean (either true or false), integer (a 32-bit number), or string (a character string without quotes).

  • Value—The value is dependent on the type of the preference. Firefox makes no attempt to translate between formats; a number entered for a string preference will be a string.

The final piece of the about:config user interface is a pop-up context menu. This menu, shown in Figure 9.6, is displayed whenever a preference is right-clicked.

The about:config pop-up context menu allows modification of a preference’s value and creating a new preference.

Figure 9.6. The about:config pop-up context menu allows modification of a preference’s value and creating a new preference.

The about:config pop-up context menu provides the following functionalities:

  • Copy Name—This copies the selected preference’s name into the Windows Clipboard. It can then be pasted into another application or otherwise used as needed.

  • Copy Value—The preference’s value is copied to the Windows Clipboard. This functionality is useful when the preference is a string.

  • New—When you create a new preference, you must choose the new preference’s type (Boolean, integer, or string). When New is selected, Firefox prompts you for the new preference’s name and value.

  • Modify—This allows changing any preference from its current value to a new value. For Boolean preferences, this toggles the state from true to false or false to true. For Boolean (with no value set), integer, and strings, the new value is prompted for.

  • Reset—This option is available only for preferences that have a status of user set. Selecting Reset restores the original value to the preference and changes the status from user set to default.

  • Lock—This option lets the user lock a specific preference. When it’s locked, it cannot be changed by either user.js or prefs.js. This option toggles to Unlock if the preference is locked.

Adding New Preferences

All this makes it seem like every possible preference that can be set in Firefox has been included in about:config. This is not true, however.

In all, thousands of preferences can be set in Firefox; this does not include the thousands of preferences that are part of extensions. With that in mind, you can see that Firefox’s about:config lists only a handful of the more popular preferences. One Firefox installation with several extensions installed had about 900 preferences, and another installation with nothing installed still had more than 600 preferences in about:config.

Filtering and Sorting the about:config Display

With hundreds, possibly thousands, of preferences that can be set in Firefox, searching by hand could be somewhat tedious. You have the ability to sort on any of the columns about:config has (Preference Name, Status, Type, and Value), which helps, but manual searching can still be difficult.

Instead of manually searching for a preference, you can use the Filter box. In that box, type characters or words you want to see in a preference name. (You can’t filter on preference values—at least not at the time this was written.)

Note

Why would you add preferences? In fact, many preferences that affect Firefox’s operation are not present by default, and a few preferences listed don’t do much of anything—they’re simply holdovers from earlier versions of Mozilla or Netscape.

There is no exhaustive list of all the Firefox preferences. One of my future projects is to write routines that walk the Firefox source, looking for and flagging all preferences, and create a cross-reference of them. This is not the type of task that could be done manually, though, because preferences come and go.

As you type characters, about:config eliminates any preferences that do not have the characters you typed. For example, let’s say I wanted to see all preferences that had the word proxy in them. As I typed (first a p, then the r, an o, and the x), Firefox would eliminate preferences. So, finally, with prox (I didn’t type the y), I would see only 20 matching preferences (see Figure 9.7).

I’ve typed prox in the filter box and now only have to look at about 20 preferences instead of the 600+ I started with.

Figure 9.7. I’ve typed prox in the filter box and now only have to look at about 20 preferences instead of the 600+ I started with.

When I’m done with the filtered preferences, I can either clear the Filter box or just click the Show All button at the right end of the Filter box. It’s that easy.

Using Caution with about:config

The about:config feature is a great interface, but in reality there is virtually no error-checking for preferences. You can enter virtually any value you might be able to type. In fact, if you create a new preference and choose the wrong data type, the odds are you cannot insert the correct value even if you try!

Because there is no error-checking on the values you enter, pay particular attention to what was originally stored in the preference. Write down the original value (or do a screen print—that’s what I do) so you can restore the preference to what it was before you changed it. After you have created a preference in about:config, it can be removed only by manually editing prefs.js.

And, if all else fails, simply restore the backup you made just before changing anything with about:config!

Modifying Preferences with about:config

Most of the common configuration settings and preferences can be configured using Firefox’s Options dialog box, and I strongly recommend trying that first before using about:config. However, with the Options dialog box, you are at the mercy of the Firefox developers as to which preferences are important enough to include in that dialog box. Therefore, you might have to use about:config to modify a preference.

To modify a preference using about:config, do the following:

  1. Find the preference you want to change. If it doesn’t exist, you might have to create it.

  2. Right-click the preference and select Modify from the pop-up context menu.

  3. Write down, or otherwise document, your changes. A week from now, you might not remember what you changed, or why!

  4. Enter the new value and click OK when you’re done.

Preferences that are Boolean and which are set to a value (a Boolean value can be blank, although that is not recommended) can be toggled with a double-click on the preference name.

Double-clicking an integer or a string preference displays an edit dialog box where you can edit or replace the existing data with your desired changes.

Changing Hidden and Undocumented Options

A few really useful preferences are not in about:config but really should be! Thank goodness you can add these preferences and gain even more functionality with Firefox. We’ll look at some of these preferences in this section.

A few interesting preferences you can set in about:config follow.

browser.tabs.showSingleWindowMpdePrefs

This preference is a Boolean value that adds options to the Firefox Options dialog box. Setting this preference to true adds a new section named Force Links That Open New Windows to Open in to the Options dialog box’s Advanced Tabbed Browsing section. This new section contains two options: The Same Tab/Window As the Link and A New Tab.

browser.link.open_newwindow.restriction

Note

There is a wealth of information about preferences in the file all.js, part of the source code package. Download the Firefox source code, open the folder moduleslibprefsrcinit, and edit the all.js file with WordPad.

Many of the preferences that take an integer value are documented in this file, with comments showing each valid value and its effect.

This preference is in about:config already. However, it is not well documented without digging through the source or the Internet.

Possible values for this preference are

  • 0—The default value forces all new windows to be in the current tab or window.

  • 1—This tells Firefox to not divert any window that JavaScript spawns.

  • 2—Firefox will not divert JavaScript windows that include size, placement, or toolbar information.

browser.xul.error_pages.enabled

When Internet Explorer encounters an error, it displays an error page in the browser window. Firefox, by default, displays an error message box that must be dismissed, requiring extra mouse movement and an extra click. You can tell Firefox to display errors as a page by setting this property to true (the default value is false).

This property should already be in your about:config.

browser.throbber.url

The throbber (that funny space at the far right of the menu bar) can be clicked. When clicked, it takes you by default to Mozilla’s Firefox home page.

You can change the URL to anything you want by changing this preference’s string value. Just make sure it’s a fully formed URL!

browser.blink_allowed

The blinking text attribute, which does not do anything in Internet Explorer, causes text to blink. Many users find this annoying. If you set this preference to false, you turn off a web page’s capability to display blinking text.

layout.frames.force_resizability

This preference enables you to make all frames resizable, by default. This preference is great when the web designer has failed to include enough room for the frame’s content.

Setting this preference to true makes frames resizable; however, it can also make some pages look odd because all the frames will have a fixed width border.

about:credits—Who’s Guilty?

There are almost a thousand known contributors to the Firefox project. Each known contributor is listed here, alphabetically. Instructions on the page also include how to add a contributor’s name if she is not already listed.

about:Mozilla

This about: displays the following text:

 

“And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon[*] cowered in horror.”

 
 --The Book of Mozilla, 7:15

The number after the reference is actually a date—in this case July 15, 2003, the date that AOL shut down the Netscape browser division. This event is considered by many to mark the beginnings of Mozilla.org. The interesting thing is that about:Mozilla is somewhat undocumented. But, regardless, try it.

about:plugins, Plugging into Plug-ins

Each plug-in installed on your computer is available to Firefox. You might feel that you are installing plug-ins into your browser, but in fact they are at the computer level. That is, after a plug-in is installed, it remains available to all users and programs (see Figure 9.8).

All plug-ins installed on the computer are listed in about:plugins. Plug-ins are specific to a computer, not a user, profile, or Firefox.

Figure 9.8. All plug-ins installed on the computer are listed in about:plugins. Plug-ins are specific to a computer, not a user, profile, or Firefox.

Note

Because plug-ins are installed on a machine basis, if for some reason you have to remove and reinstall Firefox, you do not have to reinstall your plug-ins.

Plug-ins are set as Dynamic Link Library (DLL) files.

Working with about: Secrets for Power Users

Here are a few ideas from the experts:

  • Use about: to display information about your Firefox installation, including version, copyright, license, and other useful information.

  • about:buildconfig shows which options were used to create the current version of Firefox.

  • about:cache displays both the disk and memory cache, and optionally displays individual entries in each cache.

  • about:config, Firefox’s Configuration Console, enables you to configure many features of Firefox without having to edit prefs.js or user.js. The settings in user.js override these settings, however.

  • Backing up is the best way to ensure that, if something goes wrong, you can recover. It is better to have too many backups than not enough! Disk space is cheap; your time is not.

  • In about:config you can add preferences that are not already present. Many preferences that are not in about:config can be added to change Firefox.

  • Use filtering and sorting to find preferences quickly in about:config.

  • There are many places to find preferences that are not already in about:config. For instance, the Internet has a wealth of sites that list preferences and their options. Also, a file called all.js lists many of the possible preferences with explanations of valid settings for them. A good starting point is http://preferential.mozdev.org/preferences.html.

  • To find out who has helped work on Firefox, use about:credits. This lists the approximately 1,000 people who have programmed, tested, and worked on Firefox.

  • The little-documented about:Mozilla provides a light moment. Try it.

  • Plug-ins are operating system objects, available to all installed browsers. Most plug-ins do not have to be reinstalled when changing or updating the browser.



[*] Mammon is the demon of money.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.17.46