File (MIME) Types 61
ServerThe Unix
File (MIME) Types
Web Design in a Nutshell, eMatter Edition
Chmod syntax also has an alternative letter system. Without going into detail, the
command:
chmod -R go+rx *
is a quick and powerful way to set permissions for the current directory and every
directory and file within it (-R). This example gives read (r) and execute (x) privi-
leges to the group (g) and all other users (o).
File (MIME) Types
Servers add a header to each document that tells the browser the type of file it is
sending. The browser determines how to handle the file based on that informa-
tion—whether to display the contents in the window, or to launch the appropriate
plug-in or helper application.
The system for communicating media types closely resembles MIME (Multipur-
pose Internet Mail Extension), which was originally developed for sending
attachments in email. The server needs to be configured to recognize each MIME
type in order to successfully communicate the media type to the browser.
If you want to deliver media beyond the standard HTML files and graphics (such
as a Shockwave Flash movie or an audio file), you should contact your server
administrator to be sure the server is configured to support that MIME type. Most
common formats are built in to current versions of server software, but if it isn’t
there already, the administrator can easily set it up if you provide the necessary
information.
The exact syntax for configuring MIME types varies among server software;
however, they all require the same basic information: type, subtype, and exten-
sion. Types are the most broad categories for files. They include text, image,
audio, video, application, etc. Within each category are a number of subtypes. For
instance, the file typeimageincludes the subtypesgif, jpeg, etc. The extension
refers to the file’s suffix, which the server uses to determine the file type and
subtype. Not all extensions are standardized.
Table 4-3 lists common media types by extension along with their MIME type/
subtype information. The ASCII/Binary information is provided to aid in making
upload decisions.
Of course, new technologies and file types are emerging every day, so keep in
mind that it is the web designer’s responsibility to make sure that for any new
media type the appropriate information is communicated to the server
administrator.
Table 4-3: MIME Types and Subtypes by Extension
Extension Type/Subtype Description
ASCII/
Binary
.ai application/
postscript
PostScript viewer A
.aif, .aiff audio/x-aiff AIFF file B