MIME Types Required by Netscape

Background information

To get Crescendo to play MIDI music on a web page, add a simple HTML tag as follows:

This causes the Netscape browser to retrieve the file "yourmidifile.mid" from your web server. When it does this, it loads a plug-in that is associated with the file's Internet file type (MIME type).

NOTE: For any plug-in to function, Netscape Navigator requires a certain MIME type for the file it is retrieving from the web server.

NOTE: You can check the MIME type that your server is currently sending out by selecting the Navigator menu pick "View"/"Document Info". From there, find the *.mid file, and click on it. In the lower panel, you will see the MIME type the server is sending out with the file. (If the server has just been changed to send out a different MIME type, clear your cache before doing this.)

There are three ways to set the MIME type:

(1) .htaccess

If your web server is Apache (the most popular server for UNIX computers) or NCSA, or compatible with these, you can set the mime type by adding a small file to your HTML directory on the server. The file name and contents are as follows:

file name: .htaccess
file contents: AddType audio/midi mid

Usually, you don't know what type of web server your ISP is using. In this case, try using this method. If it works, you're all set! (The Apache documentation page on .htaccess is at this link.)

Note: If you are testing changes in the MIME type of your MIDI files, clear the disk cache by going to Network Preferences under the Options menu in Netscape. Otherwise Netscape will continue to use the old MIME types from the cache.

(2) ftp

Note that the above paragraph says that a correct MIME type is required if http is used to transfer the midi file. This means that there is a way to work around the MIME type problem: don't use http to transfer the file. (This is why when you load the file from your own hard drive, Crescendo gets loaded -- there's no MIME information on your hard drive, so Navigator infers the MIME type from the file extension.) This also works with ftp file transfers. Here's how:

Put copies of your MIDI (*.mid) files on an anonymous ftp server. Then put an HTML embed tag with an ftp link in your Web page. For example:

Load the page with Crescendo installed, and you'll hear the music! You have just avoided the dreaded MIME type problem!

The problem with this method is that for most ISPs don't allow public ftp access.

Note: If you are testing changes in the MIME type of your MIDI files, clear the disk cache by going to Network Preferences under the Options menu in Netscape. Otherwise Netscape will continue to use the old MIME types from the cache.

(3) mime.types

Attack the MIME type problem head on: Persuade your ISP to configure their web server for Netscape MIDI plugins.

Put copies of your MIDI (*.mid) files where your web pages are. Then put an HTML embed tag with an http link in your Web page. For example:

or, equivalently,

Netscape plugins using http require certain MIME types for the files they retrieve from web servers. Your ISP will need to set up one of the MIME types Crescendo recognizes. (see below)

The midi files will not play unless your Web server (not your browser) is properly configured for midi. Here are the proper settings, which you should provide to your ISP:

Note: If you are testing changes in the MIME type of your MIDI files, clear the disk cache by going to Network Preferences under the Options menu in Netscape. Otherwise Netscape will continue to use the old MIME types from the cache.


How is a Web server configured to send out a certain MIME type? This is of course dependent on the server, and it's usually through editing a file called mime.types.

In summary, remember -- if your ISP or local Webmaster can configure MIME types, you can easily refer to MIDI files you place in the same place as your html files. If not, use ftp from any place on the net that will store your MIDI files where they can be retrieved by anonymous ftp.


Note that "height=2 width=0" are "magic" vaues which work to make a Netscape plugin invisible on Netscape Navigator 2.x browsers. Do not use "height=0 width=0", as this causes Navigator browsers to crash or behave unpredictably. However, setting "height=2 width=0" will cause looping not to work on Netscape Navigator version 3.0. Use "height=16 width=16" instead, which will display a small note graphic.

Copyright 1996 LiveUpdate. All rights reserved.