[Index]
[Up]
[Back]
[Next]
2.3 Naming Scheme for HTML Documents
When your HTML browser (Mosaic, TkWWW, Lynx .....) retrieves
a file it must know what to do with it. Hypertext servers
(HTTP servers) explicitly tell the browser the type of the
data being sent. In other cases, such as when the browser
is using FTP or local file access, the browsers guesses the
data type from the filename extension -- that is the part after
the dot in the filename. Thus HTML files are identified by
name.html, where the .html extension
marks an HTML document.
Four letter extensions are common. This is not a problem
with UNIX computers or Macintoshes, since these machines place
no restriction on the filename. DOS machines are unfortunately
restricted to a three letter extension. Generally
the extension is truncated to three letters (i.e.
.html becomes .htm). But, I must point out
that I do not have a PC to work with so I do not know how general
this rule is.
Here are some of the standard extensions, and their meanings:
-
.html
- HTML document, containing text and HTML mark-up
instructions.
-
.txt or .text
- A plain text file. The browser presents the
file as a block of text and does not process it for mark-up
instructions. Note that the browser will assume a file
to be a text file if nothing else is appropriate.
-
.gif
- A GIF format image file.
-
.xbm
- An X-Bitmap (black&white) image file.
-
.xpm
- An X-Pixmap (colour) image file.
-
.jpeg
- A jpeg-encoded image file.
-
.mpeg
- An mpeg-encoded movie file.
-
.au
- An aiff-encoded audio (sound) file.
-
.Z
- A compressed file - compressed using the adaptive
Lempel-Ziv coding. This compression/decompression program
are commonly found on UNIX computers.
-
.gz
- A compressed file - compressed using the GNU gzip
program. This program is common on UNIX computers and
is available on PCs and Macintoshes.
The World Wide Web uses MIME types (Multipurpose Internet
Mail Extension) to define the type of a particular piece of
transferred information. A browser in turn determines, from the
MIME type, how the data should be treated. Each browser has
a configuration (menu or file) that maps types of files
to particular functions. Some types it can handle itself, while
other types are passed to auxiliary programs, such as image or
movie viewers, sound players, and so on.
HTTP servers attach MIME contents-types headers messages
to every file they serve to the browser, so that the browser knows what
type of file it is and what to do with it. For more information on
MIME types see the
MIME
RFC Document.
If a browser gets a file from a non-HTTP server it guesses the
MIME type from the extension, as described above. It then uses the
configuration database (menu or file) to determing what it should do
with this type of data.
[Index]
[Up]
[Back]
[Next]