Mozilla Tips
Background
Mozilla is a powerful and feature-rich web browser
that was recently installed on the MUSes. Though it does
have some problems, Mozilla represents a
significant improvement over Netscape, at least in its Solaris
incarnation (Version 4.75),
which, in contrast to the Windows versions, doesn't seem
to receive much - if any - support from either Netscape/AOL or Sun.
Pages that would crash Netscape or don't display correctly in
Netscape come out just fine in Mozilla.
I had played a bit with Opera (another web browser),
using a Solaris binary that I downloaded from the Opera website, but
quickly gave up, as it was very prone to crashes. Again this is
probably not due to any inherent problems with Opera (whose Windows
and Linux versions have received excellent reviews), but the fact that the
Solaris version does not get any company support and hasn't been
updated in quite some time.
I have also researched other options (such as unix versions of Internet
Explorer), but none of these seem to be worth a closer look. My
experience with Mozilla so far has convinced me that it is
by far the best alternative to Netscape
as a graphical browser in a Solaris environment.
(There exist excellent non-graphical alternatives, most notably Lynx.
Nothing beats Lynx in terms of speed, ease of use,
and stability, and I use Lynx for
most of my web-browsing. Unfortunately, an increasing number of
webpages do not display properly in Lynx or other non-graphical
browsers, so a graphical browser is a necessity.)
Switching to Mozilla from Netscape was relatively easy, but it took
some time, and a lot of research, to customize Mozilla to my liking,
largely because of a lack of adequate documentation. This page
summarizes my initial impressions of Mozilla, and gives some tips
on using and customizing Mozilla. This is work in progress, and I
plan to update this page as I find out more.
Nonlocal users should note that the experiences described here are
specific to the setup of the UIUC Math Department's MUSes systems, and
the version of Mozilla that we have installed here. (Typing
"about:" in the URL field shows this version as:
" Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/2002.12.17").
The Good
- Automatic conversion of Netscape preferences.
When Mozilla is invoked for the first time, it checks if a
file with Netscape preferences exists (anyone who has ever used
Netscape should have such a file), and then asks the user if he/she
wants to convert these preferences. Answer yes, and Mozilla will
properly convert nearly all of these preferences, including the
bookmark file. This makes for a painless transition from Netscape to
Mozilla.
- Mozilla has the same look and feel as Netscape.
Another big plus for Netscape users is that the appearance of Mozilla
is much the same as that of Netscape, so no relearning is necessary.
This similarity is no accident, as Mozilla started out
as the code behind the Netscape browser, and new versions of
Netscape are based on current versions of Mozilla (though no such
version of Netscape seems to be available for Solaris).
- Mozilla crashes rarely.
Under Netscape, crashes were frequent, and became a real nuisance,
though over time I learned to avoid pages that caused such crashes.
Many of these crashes were not random events, but reproducible and
were triggered by specific pages, or specific actions (e.g., on
fill-out forms). In several weeks of using Mozilla, I have had only a
handful of crashes, and none of these was reproducible: I
haven't found a single page that consistently caused Mozilla to
crash. The pages that almost invariably would crash Netscape didn't
cause any problems with Mozilla.
Update (4/30/03). Having used Mozilla for about two months now,
I have had my share of crashes (though they are still a lot less
frequent than they used to be with Nescape), including one very frustrating
experience: I had filled out a lengthy survey form and tried to
print out the form before submitting it, but nothing printed and
Mozilla crashed instead. After bringing Mozilla back up, the website that caused the crash did show up in the
history list, but the filled-out form was gone, so I had to start all
over again. This time I submitted the form before trying to print it,
and I had no problems with the submission, but when I then hit the print
button, it crashed again. Prior to that, I haven't had any problems
with printing from Mozilla, so perhaps there was something unusual
about this webpage (e.g., an oversized format, or some javascript
stuff) that caused the crash.
- Mozilla recovers from crashes gracefully.
A very annoying thing about Netscape crashes is that any updates to
bookmark files during the session seem to get lost if the session
crashes. Another problem is that the "lock file" (a file which
prevents two Netscape sessions from being run concurrently and
possibly corrupting the bookmark file) often
does not get deleted during a crash. As a result, if Netscape is
invoked again, a window pops up saying that another Netscape process
is running and suggesting to delete the lock file of that process.
(This has become such a nuisance that I invoked Netscape
with a wrapper which first deleted any existing lock file,
and then invoked Netscape.)
So far, Mozilla hasn't exhibited any of these problems. (I have had
only a few crashes, so it may a bit premature to conclude that there
never will be problems.)
- Webpages that don't display properly in Netscape come up
fine in Mozilla.
Netscape has a couple of annoying bugs that cause certain types of
pages not to display properly, for example, by leaving part of the
text area blank - something I have observed on some well-known travel
reservation sites and which renders parts of these sites unusable.
Another weird behavior of Netscape is that it occasionally seems to
get stuck and just displays a blank page, regardless of which
URL is accessed; once it is in this state, the only way to get out
appears to be to kill Netscape.
Mozilla hasn't shown any of this behavior; all pages that I knew
caused problems in Netscape displayed fine in Mozilla.
- Mozilla has superior bookmark handling capabilities.
I have always found Netscape's bookmark handling to be very poor,
clumsy, and
inconvenient. The only way (as far as I know) to display the
bookmarks is as a separate popup window using the bookmark tab. The
organization of the bookmarks there leaves much to be desired; if
there are more than a few dozen bookmarks, finding a bookmark becomes
a real pain. By contrast, in Internet Explorer and Opera, bookmarks
("Favorites" in IE) are incorporated into the browser window, and are
available for quick access at all times. In Mozilla, bookmarks can
still be accessed in the same way as in Netscape, via a bookmark tab
on top of the browser screen. In addition, however, bookmarks in
Mozilla are also displayed at all times in a frame on the left side of
the browser window, in much the same way as is done in Opera or IE.
The bookmarks frame doesn't take up much space, and its size can be
adjusted to leave more or less room for the webpages. Moreover, using
the F9 key the bookmarks window can be temporarily removed from the
display. Editing bookmarks is easy and intuitive.
- Mozilla generates nicer looking printouts of web pages.
Web pages printed from Mozilla look a bit different than those printed
from inside Netscape. This is a matter of personal preference, but I
like the "look" of the Mozilla generated pages better than that of the
Netscape generated pages. Also, Mozilla adds a couple of nice, and
useful, touches to the printed pages: One is that
embedded URL's are underlined, in the same way as they are shown on the
screen. Also, Mozilla printouts show the URL, the title of the
webpage, the page number ("1 of 5"), and the date
on the header and footer of each printer page.
- Mozilla is less of a resource hog. Netscape has an annoying
habit of consuming CPU time when certain javascript-rich pages are viewed.
For example, a moderately complex fare look-up on the American
Airlines website, www.aa.com, causes the CPU percentage used by
Netscape (as shown by the "top" program)
to creep up to 70, 80, 90 percent, and sometimes higher - even to
the point that Netscape crashes.
Mozilla doesn't display this behavior; the same pages viewed in
Mozilla cause at most a moderate spike in CPU usage.
- Mozilla is highly customizable.
In addition to setting preferences in the "Edit/Preferences" menu,
Mozilla has several configuration files that can be edited, changing
the behavior of Mozilla in ways that aren't possible (as far as I
know) in Netscape and Internet Explorer.
An example is the disabling of popup windows.
For more on this see the "Tips" section below.
- Mozilla is free, open source,
and supported by a large community of
developers. In much the same way as Linux, and in contrast to
Internet Explorer, whose source code is closely guarded by Microsoft
(even though the browser itself is available for free),
Mozilla is freely available, with full source code, and it is being
actively developed by a large community. With the release of several
new versions during the past months, development of Mozilla has
accelerated. I believe Mozilla is here to stay, and its share in the
browser market will continue to grow.
The Bad
Most of these items are not inherent problems with Mozilla, but
temporary problems that will eventually become moot.
- Mozilla is huge.
In contrast to Opera, which is legendary for its small "footprint"
(usage of memory and disk space), making it faster, more efficient, and
easier to maintain than Netscape or IE, Mozilla is a huge, bloated,
and complex piece of software. This is not necessarily a problem, but
it does makes installing Mozilla a highly nontrivial undertaking.
Our version of Mozilla was downloaded in
binary form, as attempts at compiling Mozilla on our local system
from source code (which would have been the preferred approach) failed.
- Documentation is sparse. The documentation available through
the Help menu covers only the basics. The
Mozilla home page does have faqs
and additional information, but it is not (yet) well organized, and
some of the documentation is still being developed. (See
below for some links.)
- Java support is still missing. Our current version of
Mozilla does not support java. There is a help ticket [#3961] on this,
and I expect this will be taken care of in the near future. For the
time being I just use Netscape if I need to run java applications.
- Customization beyond the basics is difficult.
Mozilla is highly customizable, but any customization beyond the
basics (fonts, colors, etc.), which can be effected via the
Edit/Preferences menu, requires editing one of several configuration
files, whose syntax is obscure and not well documented. The files are
located in the .mozilla hierarchy under the user's home directory,
which is four levels deep. The most
relevant (and easiest to customize)
files are those of the form *.js. However,
there are several other, more obscure,
files which control the behavior of Mozilla: a binary file named
appreg in the .mozilla directory,
and files of the form *.rdf and *.css, two levels underneath that
directory. The latter files are written in html extension languages (rdf =
resource description language, css = cascading style sheets), so to
edit these files one would need some knowledge of the syntax of these
languages.
- Mozilla doesn't use X resources.
Standard X applications like xterm, netscape, xdvi, xpdf, acrobat, gv,
etc., all use so-called "X resources" to control the behavior and
appearance of the application (e.g., the size and positioning of
windows). X resources are variables that
can be defined on the command line or placed in a
configuration file such as .Xdefaults.
The nice thing about this system is that the syntax for the appropriate
commands is essentially the same across all such applications.
By contrast, Mozilla uses a different mechanism, the "GTK toolkit", and
cannot be controlled in the same way as these other programs.
There are probably ways to do the same things with this toolkit
that one could do with X resources, but that requires some relearning,
and documentation about GTK is hard to come by.
- Mozilla window positioning. Related to the previous point is
the following strange, though rather harmless,
behavior I noticed. With standard X applications, one can
specify the positioning and size of the window via X resources.
Every time the application is invoked, the window then appears in the
form specified. Since Mozilla doesn't use X resources, this method
doesn't work. Fortunately, Mozilla seems to remember the size of the
window from one invocation to the next, so after sizing the Mozilla
window manually, the window will appear in the same size in subsequent
invocations. However, the position of the window is not maintained
across invocations, but rather seems to shift slightly to the right.
- The appreg file. One of several files that control the
settings of Mozilla is a binary file, called "appreg", inside the
.mozilla directory. This file is generated automatically by Mozilla
and not intended for manual editing. Among other things, it
stores the location of
other configuration files. If it gets deleted or corrupted,
Mozilla may not find those files
and prompt the user to create a new profile.
This happened to me after my home directory was moved from one
partition, /home/9/, to another, /home/20/; since /home/9/ was
hard-coded into appreg, Mozilla wasn't able to locate my configuration
files and I kept getting prompts to create new profiles. It took me a
couple of hours of trial and error and moving files and directories
around, to extricate myself from this situation and get Mozilla to
recognize my old configuration files.
I searched for documentation about appreg, but found almost nothing.
I think there should be an
easier and more intuitive way to handle situations like this.
- Minor, and correctable, nuisances.
The following are not problems per se,
but things I found quite annoying when I started using Mozilla and
which prompted me to research ways to change Mozilla's behavior in
those respects. Of course, some may consider the same items desirable
features. See the Tips section below for how to "correct" these
problems.
- Download manager window. When downloading a file, or simply
displaying a pdf or ps file, a "download manager" window pops up.
In the default configuration of Mozilla,
this window has to be killed manually, something I find quite annoying.
- Autocomplete feature. Another default behavior, which I find
exceedingly distracting, is the "autocompletion" of URL's typed into the
URL window.
Tips on customizing Mozilla
Basic customization is effected via the Edit/Preferences menu, and is
straightforward. Here are some tips on further customizing Mozilla.
- The .mailcap file.
This is a file in a user's home directory that Mozilla
consults to pick an appropriate application
for displaying non-text files, for example, gv for postscript
files, acroread or xpdf for pdf files, xdvi for dvi files, etc.
If you have a .mailcap file (Netscape may have created such a file),
then it probably contains the appropriate
commands for viewing such files. If not, here is a minimal example of
a .mailcap file that defines applications for viewing postscript,
pdf, and dvi files:
application/postscript; gv %s
application/pdf; xpdf %s
application/x-dvi; xdvi %s
The same file is available at
/home/users/hildebr/pub/mailcap.sample,
and local users can simply copy this file onto a file named ".mailcap"
in their home directory.
Once a .mailcap has been set up, Mozilla should be able to find
and use the applications specified in this file. However, this does
not happen automatically. Instead, the
first time a particular file type is accessed
in Mozilla, a dialog window appears.
If the file type
has a corresponding entry in the .mailcap file, one of the options
offered will be to display the file with the application specified in
.mailcap (e.g., xdvi).
Choosing this option would indeed cause the file to be
displayed, but before doing so, you should also check
the box "Always use this application ...". Otherwise you would
again be prompted the next time a file of the same type needs to be
displayed. Once this box has been checked, in subsequent accesses of
files of the same type Mozilla invokes the appropriate application
without further prompts by the user.
- The user.js file.To allow further customization of Mozilla,
create a
file called user.js two levels below the .mozilla directory.
The same directory should contain a file prefs.js (and a few other
files and directories). The syntax of user.js is the same as that of
prefs.js, but user.js gets read in after prefs.js, so
anything placed in the file user.js overrides the settings in prefs.js.
The tree from your home directory to this file should look similar
to this:
.mozilla/hildebr/abc3xyz.slt/user.js
The following are some entries that I have placed in my user.js file
and which change some aspects of the default behavior.
Local users can copy the entire user.js file (containing all of the
settings below) from /home/users/hildebr/pub/user.js
to a location under their home directory similar to the one above.
Alternatively, create a file user.js manually, and enter the desired
commands into this file.
- Disabling the download manager window. The following line in
user.js will disable the download manager window. (There will still be
a window with a progress bar indicating the status of the download, but
it will disappear after the download is finished.)
user_pref("browser.downloadmanager.behavior", 2);
- Disabling the autocomplete feature. This is achieved by the
following lines in user.js.
user_pref("browser.urlbar.autocomplete.enabled", false);
user_pref("browser.urlbar.showPopup", false);
user_pref("browser.urlbar.showSearch", false);
- Disabling popup windows. The following disables nearly all
popup/popunder windows (including those annoying x10 webcam ads!).
user_pref("dom.disable_open_during_load", true);
- Setting the background to grey. In Netscape, the default
background color is grey, while in Mozilla it is white. I prefer the
Netscape grey. The following line in user.js sets the background to
grey. (This can also be set via the Edit/Preferences menu.)
user_pref("browser.display.background_color", "#CCCCCC");
-
[9/13/03] Making Mozilla the default browser under CDE.
In the default setup of the CDE windows environment, clicking on the
webbrowser icon (the small globe right above the EXIT button) brings up
Netscape. To change the default browser to Mozilla (which offers many
advantages over Netscape - see my Mozilla Tips page),
add the following line at the end of the
file ".dtprofile" in your home directory:
export BROWSER=mozilla
The change will take effect next time you log in.
Further resources
Last modified Thu 30 Oct 2003 05:19:33 PM CST
A.J. Hildebrand