Chapter 8

Installing and Configuring Browser Software


CONTENTS

One of the most visible choices you will make when designing your Intranet is the browser. This is the software that all the users will use everyday.

Once you choose a browser you need to set it up and also set up the networking software. In addition to this you may also need to set up helper applications, these are programs that work with the browser to display files.

In this chapter, you will learn the following:

Introduction to Browsers

Setting up a Web server is only a part of setting up an Intranet. You must also configure and install a WWW browser. This browser is what the users see and therefore must be chosen carefully. This chapter covers how browsers work, what software is available, and what features to look for.

Web browsers talk to servers using the HTTP. Once the browser gets the document it must decide how to view or save it.

This is done by comparing the documents mime-type with a list of supported MIME types. MIME stands for Multipurpose Internet Mail Extensions, MIME types are a way of telling software, such as mailers, what type of data a file contains. Some MIME types such as text/html can be displayed directly in the browser. Other types may need to use an external viewer. MIME types are discussed later in this chapter.

Documents may contain more than one file type. A good example of a document that has more then one mime-type would be a document with inlined images. When the browser downloads the file, it sees the inlined images and also requests those from the server. The page is actually one mime-type but the entire document consists of multiple MIME types.

Some browsers, such as Netscape's Navigator, display the text before downloading the images; so users can start reading the page without having to wait for all the images to download. Other browsers such as lynx, don't download the images at all. This is also true if your browser has an option to delay image loading.

Certain images can be partially viewed as they are being downloaded. These include interlaced gifs and progressive jpeg files. These images may start out blurry looking and gradually get clearer and clearer until they are in focus, or they might start displaying at the top of the screen and fill in as they are downloaded. It's also possible to have animated gif files, in which simple movement can occur within the image.

MIME Types

MIME types are used to tell programs what type of data is stored in a file. When a server sends a page, it also sends the mime-type with it.

When the browser receives a document it looks at the mime-type to decide how to display the document. Some MIME types can be handled by the browser, such as text/plain or text/html. Other MIME types need to launch an external program.

When a browser needs to start an external viewer it looks at the mailcap file to see what program to use and what arguments it needs. The MIME types and mailcap files may be stored in a number of places depending on the browser. Some broswers allow you to edit the MIME types and mailcap files in the browser. Check your browser documentation for more details.

The MIME types file normally consists of lines containing:

mime-type    ext1, ext2

The mailcap file consists of lines of the form:

mime-type  ;  program [args]

The args section can contain %s. This is replaced with the filename the browser is using to reference the file. For example, to have a program called docview get started with the filename as the only argument, when it receives a file type of application/doc, add:

application/doc   ; docview %s

to your mailcap file. If it needs other arguments, for example a view option, you could add it to the line as well. This changes the line to:

application/doc   ; docview -view %s

Using the MIME types and mailcap files in an Intranet facilitates storage and retrieval of company specific files from a central repository. If your company makes foo programs that can be viewed with the bar viewer. You can add an entry to the client and servers MIME types files and an entry to the client mailcap file to have the browser automatically start the bar program when the user clicks on a foo file.

CAUTION
It's also possible to setup the MIME types and mailcap files to automatically start program interpreters, such as command.com or /bin/sh. Though this can make it much easier to make changes to software, it opens up many security holes. This is because any document with the right mime-type will be interpreted as a command. This includes documents malicious crackers or users may setup on the Internet.

External Viewers

External viewers are separate programs that the browser knows how to use. The browser saves the file in a temporary area and calls the external viewer to look at it. The viewer is displayed in a separate window and may have a different look and feel than the browser.

There are many different types of viewers some of the more popular ones enable you to view:

External viewers start up in another window. The next set of programs we will look at are called plug-ins. They are Netscape specific, at this time. Plug-ins are third party add-ons to the browser that extend its use.

Plug-ins

Starting with Navigator 2.0, it's possible for software companies to easily build add-on utilities into the Netscape browser. These utilities are built to extend the Netscape browsers. Unlike viewers, they are integrated into the browser and look like a part of it.

The following plug-ins are on the CD located on the back cover of this book.

Plug-ins are available for many different applications, from sounds, to graphics, to 3D. There is even a text to speech plug-in available for Macintosh, called Talker, that reads the Web page to you.

TCP/IP Software

Because the Intranet is IP-based, it's necessary to setup IP networking software on the clients and servers. IP networking can be run in addition to other networking protocols such as IPX.

IP was designed to link many different types of machines together. It can be used on a UNIX machine to talk to a Macintosh, or on a VMS machine to talk to a Windows machine.

IP is a layered protocol, so it can run on many different media types, and networking topologies. IP, for instance, can run over 10Base-2 Ethernet, or Token Ring using unshielded twisted pair.

IP stacks, or TCP/IP stacks as they are commonly referred to, may also include applications, such as telnet, ftp, sendmail, and a web browser. These applications together make up a TCP/IP suite.

Built-in stacks

TCP/IP is such a popular protocol many companies have incorporated it into their operating systems. Microsoft now includes a built in TCP/IP stack into their Windows 95 software, as well as their NT operating system. You can also download a TCP/IP stack for Windows for Workgroups from Microsoft's Web server, http://www.microsoft.com/.

There are also shareware and commercial TCP/IP stacks available for Windows machines. These include:

Unix vendors have had TCP/IP built in to their systems for quite a long time, and it would be hard to find a UNIX vendor that didn't ship TCP/IP with a new OS. Some UNIX versions may have the IP software unbundled but it should be available from the vendor or a third party source.

Macintosh systems also have TCP/IP software built into the newer releases of system software.

Configuring TCP/IP

There are many different versions of TCP/IP stacks, some UNIX versions have many different files that need to be edited, others have a graphical interface. Window machines, Macintoshes and OS/2 machines also have graphical interfaces.

No matter what type of machine you are on or what type of operating system there will be a few things that needs to get filled in. These are:

Where and how you fill this information in will depend on which machine and operating system you are running. Consult your documentation.

Choosing the Browser Software

After the TCP/IP software has been chosen, you need to decide on a browser. Since this is the part of the Intranet the users see, this is the most important part. This is also the hardest part to change later so careful planning is necessary when choosing a browser.

Standardizing on a browser is one of the benefits of an Intranet. If everyone is using the same interface it can make developing documents much easier because the developer knows which features will work.

Normally, a developer must try to work with the least common platform. This either requires pages that do not take advantage of the latest specification, or writing pages that can handle both newer platforms, as well as the older ones. This is often done by using CGI scripts.

Having one browser type in use also makes it easier on users. They can sit down at any machine and be comfortable using the Web browser. If you have multiple types of machines, such as UNIX and Windows, it might make sense to choose a browser that runs on both platforms. Some browsers, such as Netscape or Mosaic, can run on OS/2, 16 bit windows, 32 bit windows, UNIX, and Macintosh. This makes it easy if a user ever needs to switch hardware since they will be familiar with the Web browser.

If possible, setup your browser on the network, rather then on each users machine. This makes it much easier when the time to upgrade comes. UNIX versions of Netscape and Mosaic allow multiple users to use a single executable. If this is not possible, you can create a script that the users can run to upgrade their software from the network. Using a script to upgrade the network can save much time and allow the IS staff time to do other things.

NOTE
There are some packages that can be used to automatically load new software on everyone's machine. These packages can save hundreds of hours of administrator time and are generally well worth the money. One of these packages is ManageWise from Novell (http://www.novell.com) and SMS (Systems Management Server ) from Microsoft (http://www.microsoft.com).

Integration with Mail and Usenet

Most Intranets are going to be built using e-mail and Usenet, as well as Web servers. E-mail has been used for years and is probably already in place at your company. If you choose a browser that allows reading and sending of e-mail and Usenet articles you can eliminate the need to have two additional clients on the desktop.

Some features to look for include reading and posting e-mail and reading and posting usenet articles. Some browsers may allow reading usenet and posting e-mail but not reading e-mail and writing articles. Currently, Netscape and Internet Explorer are the only two that integrate both reading and writing of e-mail and usenet. Figure 8.1 shows a user reading e-mail with the Netscape browser.

Figure 8.1 : Reading e-mail from the Netscape browser.

Browsers should also let users reference hyperlinks that are embedded in the mail message or article. This will allow users to click on a hyperlink in a mail message and have a browser open up displaying the link. This makes it much easier on users since they don't need to type in URLs by hand.

Frames

Frames are currently supported on the Netscape and Microsoft browsers, though more browsers will be supporting them in upcoming releases. Frames enable the client's browser view to be separated into multiple windows so that multiple screens of information can be displayed side-by-side. For example, an index page can appear on part of the screen and the information on another. Frames have many uses in an Intranet, some places where the use of frames make sense include:

Frames are a very useful feature if used with some common sense. Many sites have too many frames on one screen, instead of making it easier to navigate, this actually makes it more confusing. It's best to limit users to two or three frames per screen. Any more than three frames and they can get to be too small and confusing.

Customization

You may want to customize your browser to make it more "Intranet aware." Some browsers such as Microsft Explorer and Netscape have administration kits. These kits allow you to customize the look of a browser.

Such customizations may include changing the Netscape icon to the company logo or changing the URL that loads when the users select Help. These customizations might also allow you to add buttons or additional menus.

The administration kit for Explorer is available from http://www.microsoft.com/ie/ieak. The Netscape administration kit is available from http://partner.netscape.com/comprod/products/navigator/version_3.0/index.html.

Java

Java is Sun Microsystems's hot new programming language. It uses a virtual machine, the Java VM, to enable code compiled on any machine to run on any machine that supports the Java VM. This can help to reduce development time and can allow programmers to focus on new projects, not porting to new platforms.

Java enables developers to develop executable content, which ranges from something as simple as an animated icon to something as fancy as a 3 dimensional viewer. Java programs can be downloaded over the Internet or Intranet. This enables developers to easily upgrade existing applications. Currently Netscape, Microsoft and Sun have Java enabled browsers. Java programs that can be embedded in an HTML page are called applets.

Java programs can be developed to run on the client rather then the server. This is important for CPU intensive programs because the server won't get bogged down running the application. This client processing enables developers to create true distributed applications. This can also help reduce network traffic since the data doesn't have to travel to the server to be processed.

Some Intranet uses for Java include:

As Java becomes even more popular, developers might want to convert from their existing programs to Java programs. This would enable the company to move from client-server applications to distributed applications. A good example of this would be a data entry program that interprets the data that is being entered, performs calculations, and then submits the data to multiple databases.

NOTE
Current Java uses are geared more towards "cool tricks." Intranets shouldn't be based on coolness but rather on usefulness. Don't use Java just because it is the "in thing." If you don't have a need for it, don't use it.

Java is covered in Chapter 13, "Java and JavaScript."

Forms

Forms are supported by almost all current browsers. They enable users to enter data and submit it back to the server for processing.

Forms are built using HTML tags, which are tags that build buttons, menus, select lists, and text areas. Figure 8.2 shows a page using forms. Forms are also covered in more detail in the next chapter.

Figure 8.2 : Forms can contain different elements.

Forms have many uses in an Intranet. They can be used in place of paper- based forms to facilitate easy submissions and updates.

Electronic submission is particularly well suited for forms that need to go to multiple departments at once. Each form can be processed and sent to the appropriate groups at submission time. This eliminates the need for copies of the same paper form.

It is often possible to automatically handle a form submission by creating a script that acts on the form data. An example of this would be a scheduling page. This page could have projects deadlines and scheduling delays. If an employee realized a deadline would be missed they could fill out a form to automatically update the global schedule.

CAUTION
Be careful when automatically acting on form data. Some forms may alter sensitive files and should not be changed to add form data. A good example of when not to automate would be for new accounts. New accounts should always be verified before being added to the system.

Electronic forms can be used to request new equipment, vacation time, new accounts, as well as network or phone changes.

In addition forms can be used to enable users to submit data to other programs, such as:

Forms can be used to submit many types of data. This makes them very powerful. Forms have many uses in an Intranet, they are limited only by the developers creativity.

Forms are covered in Chapter 11, "HTML Forms."

Tables

Tables are a new feature to HTML so some browsers may not include support for them yet. Netscape Navigator and Microsoft Internet Explorer are two browsers that can display tables. Tables enable the developer to set up rows and columns. Figure 8.3 shows an example of a table.

Figure 8.3 : Tables make data easier to read.

Standard HTML didn't allow precise control of horizontal layout so it was hard to make columns line up properly. Most developers resorted to using the <pre> (preformatted) tag to handle this. The <pre> tag tells the browser the text is already formatted correctly and not to perform any other formatting on it. The <pre> tag however didn't work very well if the browser windows were too small.

Tables can specify the number of columns across a page. For example, you could tell your browser to have four columns. It would automatically size the table to fit four columns of equal size on the screen.

Tables can set up to use a certain percentage of the screen per column so you can set up a defined number of columns, regardless of how wide the screen is. For example, you could say each column is to use 25 percent of the width, to get four columns. If the screen were 600 pixels across each column would be 150 pixels. If the screen were resized to 400 pixels each column would shrink to 100 pixels. You could also use three columns one could be set to use 25 percent of the width, one could use 50 percent and the last could use 25 percent. This allows variable sized columns.

Tables can also have captions defined. This is text that describes what the table is showing the reader. This can be be placed above or below the table. Table headers can also be setup for each column.

Tables are as useful on the Web as they are in paper-based documents. They allow easy reading of numbers, and summary of data.

Tables are used mostly in static documents to emphasize a point. They can also be used dynamically to organize information retrieved from a database. However the tables are generated they are very useful in an Intranet.

Some common uses for a table in an Intranet include:

Multiple Platforms

Tables, forms, frames, and Java are all very useful features but it's more important to make sure the browser works on the platforms in use at your company. Many companies have different platforms; engineering may have high-performance UNIX machines. Marketing might have Macintoshes and accounting might have ASCII terminals.

While it is important to standardize on a browser, it may not be feasible for the entire company to use a single type of browser. For example, if one group of people are using dumb terminals, it doesn't mean everyone should use lynx. You should try to limit the number of different browser types in use. For example, all graphics terminals might run Netscape and anyone with an ASCII terminal might run lynx. This would enable the users that can view graphics to take advantage of them, while those that can't, still have access to the data.

Troubleshooting

Configurations differ from browser to browser, though they all work basically the same way. If you are using a browser as an e-mail client you will need to define a mailhost or SMTP gateway. This is the machine that actually sends and receives mail.

If you are using it to read news, you need to define an NNTP server. You must also enter the real name of the user, the organization, and an optional signature file.

Once the browser is up and running, it doesn't need to be changed often. Sometimes things go wrong, however, and some troubleshooting will be needed.

By understanding how a client and a server communicate you can test certain parts of the process and narrow down what is causing the problem. By testing the process in pieces you can narrow down the problem to the client, server, or the network in between.

In the next few sections, we will look at some common problems and some techniques that are useful in troubleshooting.

Connection Problems

One of the more common problems relates to communications. These normally are caused by network errors. Error messages that should indicate a communications problem would be:

NOTE
The actual error message you receive may be worded differently than these. If the error messages you are getting look similar to the ones above then you may have a connection problem. For example your browser may report "host unknown" instead of "unknown host."

Unknown Host

Unknown host means the browser couldn't figure out what IP address to use to get to the host in the URL. This may be a permanent problem or a temporary one.

When a browser tries to resolve a name it does one of three things. It checks the local host file, checks the name server, or checks the NIS server. Which action it takes depends on your network setup.

If there is a problem trying to reach the DNS or NIS servers, this might be caused by an overloaded network. If the problem goes away after a few minutes, then network congestion is more then likely the culprit. You can also try using the ping program to reach the IP address of the DNS or NIS servers. If you can't get an answer from the server using ping you have a network problem that needs to be solved first. This can also mean the machine is crashed or turned off.

If the servers answer, check to make sure they are running the correct processes to resolve names. If you are administering the server, you can check this by trying to resolve a name on the server, using nslookup. If this doesn't work then they may be having problems reaching the root servers, try to ping one of the root servers. If you aren't sure what this means, check your documentation on DNS resolution.

If you are running NIS and can resolve fully qualified names properly on the server, you may need to check the flags on the ypserv program. Ypserv needs to be told to check the DNS if it can't resolve the name by itself. For most versions this is the -d option.

You can usually get around resolution problems by using the IP address of the machine in the URL.

Connection Refused

This error message usually means that the Web server is not running or is running on a different port than the one your are telling it to use. This can also be a temporary problem caused by too many users trying to connect to the server at one time.

The best way to check this is to login to the server, if possible, and try to connect to the server from there. If you can't then the server is probably not running. Restart it and try again.

If you can connect locally but not remotely, then you may have a network problem. On the client, ping the server, verify that the IP address is the correct one. It is possible that the client is resolving the name incorrectly and is connecting to the wrong host.

Destination Unreachable

Destination unreachable can be caused by a number of network problems. You may also get port unreachable or host unreachable. All three point to the same issue.

This condition is usually caused by a Router or gateway being down or misconfigured. The best programs to use for finding the problem is traceroute, or Iptrace. Some TCP/IP suites have this program included. It tests the network between two machines, much like ping, but it also shows all the gateways that it goes through to get there.

Traceroute tells you how far it gets through the network before it is refused.

Viewing Problems

Sometimes a connection works and the browser gets documents but doesn't display them correctly. This may not give an error message but will show garbled output or nothing at all in the browser.

Some browsers may interpret HTML slightly different than others. Standardizing on a browser will help alleviate this problem.

Documents Look Funny

If the document shows up in the viewer but doesn't look right, the server is probably sending an incorrect mime-type. If you maintain the server, you can check the MIME types file on the server. Check Chapter 1, "The WWW and the Intranet," for more information on MIME types.

If you do not maintain the server, for example, if it is a remote server, you may be able to get around the problem by downloading the document to a file. Name the file with the correct extension to assign the correct mime-type to it. Most browsers allow you to download a file to disk. Once the file is downloaded you can use the Open local file option to read the file. You should also notify the server administrator so they can correct the problem.

Viewers Don't Start

If your viewer can't display a document, it tries to start an external viewer for it. Occasionally the external viewer won't start. It may give an error message or it may silently fail. Either way it signifies a problem in the mailcap file.

NOTE
Some browsers don't have a mailcap file. They use an internal table or a different configuration to define external viewers. Check your browsers documentation to see how to define external viewers.

The first step in troubleshooting is to download the file to local disk. Save it with the correct extension since some programs require certain extensions. Next, check to make sure your viewer can handle the file. Start the viewer and try to open the file. If it works correctly, then you might have a problem with the mailcap. If it doesn't display correctly, you may have a corrupted file.

If it displays correctly when you run the viewer by hand, check the syntax in the mailcap file. Make sure you are using the right arguments and passing the correct filename. %s is usually replaced with the name of the file the browser is using for temporary storage.

If everything looks right, you might need to set your path. If the viewer is not in your path you need to add it and restart your browser.

If the viewer still doesn't work, it's possible the server is sending the wrong mime-type. Check the server to be sure it is correctly identifying the file. If you don't have access to the server, you can use a LAN analyzer or network sniffer to see the packets sent to the client.