Skip to the content

Kansas State University

[an error occurred while processing this directive]
[an error occurred while processing this directive] [an error occurred while processing this directive]

MIME Types on the K-State Server

"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

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:

  1. Standardized types take precedence
  2. Types as delivered with the Netscape Enterprise HTTP server

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.

To associate a MIME type with a file extension

  1. Create a file named .nsconfig in the directory that contains your web files.
  2. In the .nsconfig file, add lines in the following format:
    <Files *>
    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.

To cause a file to be saved to the browser's disk

When a browser receives a file of MIME type application/octet-stream, 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.

  1. Change the file's extension to .bin. The extension .bin is already mapped to application/octet-stream. Note that you can use multiple periods in a name. For example, the file could be named myname.xls.bin.


  2. Map the file's current extension to application/octet-stream using the directions in the previous section.