"MIME media types" are a standardized method to specify the types of computer files. MIME stands for Multipurpose Internet Mail Extensions, and the MIME type codes are documented in RFC2046, RFC2048, and http://www.iana.org/assignments/media-types/.
Although MIME started as a way to describe files sent via e-mail, it now is also used in the communication between web servers and web browsers such as Netscape Navigator. Communicating the proper type information is needed to in order for the browser to properly interpret and display web content.
When a browser contacts a web server and requests a file, the server sends not just the contents of the file, but also tells the browser the file's MIME type. The server determines the MIME type by looking up the file's extension (the part after the last period) in a table.
Once the type information is received by the client, it consults a table of its own to determine how to handle the file. This table is configurable by the client's preference settings.
The web server software provides a default table of common file extensions and types. Unfortunately, the actual standards organization moves very slowly, and many of the interesting and new file types have not been standardized. This leads to chaos as each web server can pick different MIME types for the same type of file. In fact, a few of the entries that were customized at K-State several years ago are now in conflict with the standardized values.
To help avoid further conflicts, Computing and Telecommunications Services will configure the MIME type table with the following priorities:
If you want to use a media type that isn't in the server's table, you can add it for the files in your directories.
.nsconfigin the directory that contains your web files.
.nsconfigfile, add lines in the following format:
addtype exp=*.ext type=application/x-type
The file can contain as many addtype lines as needed. Each line associates a file extension, ext in the example above, with a MIME type, application/x-type in the example above.
When a browser receives a file of MIME type
it presents a dialog box to the user to allow a download location to be selected.
There are two ways for the server to send files with this MIME type.
Change the file's extension to
.bin is already mapped to
Note that you can use multiple periods in a name.
For example, the file could be named
application/octet-streamusing the directions in the previous section.