Note: The Content Viewers feature is not available on all platforms.
If the
There are a multitude of file types on the World Wide Web. When &browser.name; encounters a file that it can't display in a web page, it looks in a table of Content Types to find out how to display the file based on its type. For example, when it encounters an audio file, it launches the appropriate audio player.
The information you set on the Content Viewer Preferences page tells &browser.name; to do one of the following things when it encounters a file of a specific type:
&browser.name; determines the type of a file by referencing its MIME (Multipurpose Internet Mail Extensions) type, which is sent to the browser from the http server along with the file. This tells &browser.name; the general type of file (text, audio, image, video, application, message, or multipart), and a more specific subtype (PostScript, TIFF, ZIP compressed data, and so on).
If a file's MIME type is not available (for example, if the file is loaded with a non-http protocol, such as the ftp or file protocol), &browser.name; uses the file's extension to map the file to a MIME type. The file extension is simply the last letters of the file name, which appear after a period. For example, a file named "myfile.txt" has ".txt" as its file extension, and maps to the text/plain MIME type.
&browser.name; uses a table of content-type definitions, found on the
Note: You must tell &browser.name; where on your system to find your external applications by setting the exec.path property in your &browser.name; properties file. See Setting the exec.path Property for information.
To see how &browser.name; currently handles files of a particular type, select the type from the Content Types scrolling list. You can modify the following information for that content type by updating the fields to the right of the Content Types scrolling list, and clicking OK:
For example, suppose you want to add a new file extension (.abc) to the list of Plain Text file extensions, so files with that extension will be treated as plain ASCII text. You can do this by selecting the Plain Text Content Type, adding ".abc" to the Extensions field, and clicking OK. Remember, however, that &browser.name; first looks to the file's MIME type, not its extension. Thus, if a file with the new extension is sent from an http server to &browser.name; along with a MIME type, the file's extension will be ignored.
To add a new Content Type, follow the steps below. These steps show an example of how you would add support for a type of images called raster images, using a viewer application called imagetool. You can use these steps to add support for any other file type and/or viewer application.
Note: If you type an application without the full path name where the application is located on your file system, you must make sure the exec.path property is set. (See Setting the exec.path Property.) If you click Choose to select an application, the full path name is entered into the Application field, so you don't need to be concerned about the exec.path property for this particular application.
Note: If you select a MIME Type/Subtype combination that is already defined, your new definition (description, extensions, action, and application) will override the previous definition.
You should see your new definition in the Content Types scrolling list, and you can now access files of that type using the action you specified.
If your Action was View in Application, you'll notice that &browser.name; appends %s at the end of the Application definition when you click OK. It uses the %s later to substitute the actual file being opened.
In some circumstances, &browser.name; creates temporary files to display content within the browser or to launch external applications. See Temporary Files for Content Viewer Applications for information about the location of these files, and how you can control whether some of these files are automatically deleted.
Table of Contents | INDEX |
Copyright © Sun Microsystems, Inc.