10 Jan 1997
The Web is so good at displaying so many types of data that people often assume that Web Browsers and Servers simply know everthing. This is clearly not possible.
Under current HTTP, the server begins every response to a Browser by declaring that the following data to have a particular format. The standard represents data formats by a MIME type. MIME is an internet standard originally developed for E-mail. It declares a major type (text, image, application) and a minor type. For example:
text/plainis ordinary unformatted text
Data type is not an attribute of files in either Unix or the Windows NT directory structure. So generally, the Web Server guesses the right MIME type based on the file "extension" (the part of the file name after the last period). A Microsoft IIS Web Server uses the mapping of file extension to mime types configured in the "Classes" section of the operating system Registry. A Netscape Web Server is configured by files in its /usr/local/ns-home/httpd-hostname/config or \netscape\server\httpd-hostname\config directory. The "mime.types" file contains a list of MIME types and their associated extensions:
type=application/pdf exts=pdf
type=application/postscript exts=ai,eps,ps
type=application/rtf exts=rtf
It is also possible for the Browser to make a guess about the type of data based on the extension of the file. However, the Browser will make such a guess only when the file is fetched using FTP or some other protocol. A Web Server is supposed to send a MIME header, and then the Browser will defer to the server's best guess.
A Browser can display plain text, HTML, and several popular image types (GIF, JPEG). The browser may also be able to play audio files (*.AU or *.WAV). More exotic data types are supported through a Helper or Plug-In.
A Helper is an external program that knows nothing about the Web. Any program can be a Helper. When the Browser is about to receive a file whose MIME type is not internally supported by the Browser itself, it looks the type up in a table. If a Helper program is configured for that type of data, then the file is received into a temporary directory and the Helper program is launched as a separate Windows application to view or play the file.
A Plug-In is a program that was written specifically to communicate with the Netscape Navigator Browser (or any other Browser that supports the Plug-In interface). A plug-in is packaged as a DLL in Windows and a Shared Library file (*.so) in Unix. It is installed in a subdirectory of the Netscape Browser and is loaded into memory when Navigator starts. If a file is received with a MIME type associated with one of the Plug-Ins, Navigator calls functions in the Plug-In shared library display or play the file inside the current Navigator window. Plug-In modules extend the set of file types for which Navigator appears to have standard internal support.
A Plug-In library is generally written in C or C++. It functions as ordinary code that is part of the Browser program. Unlike Java Applets, which are constrained by a security policy, a Plug-In can access disk files, open network connections, run other programs, and issues commands to the operating system. The user must first obtain and install the Plug-In before it can function, and the assumption is that a user will use the same care installing this code as he does any other program.
Copyright 1996 PC Lube and Tune -- Distributed Applications and the Web H. Gilbert