A Special Problem with MIDIs
One particular problem with MIDI files on the web is common enough to merit special attention. You may find that when you try to download a MIDI file from your web site, your browser does not recognize what type of file it is. This can happen even though your browser understood the file when it was on your local hard drive. Here's what's going on in this situation. Every time a web server sends out a resource such as a web page, MIDI file, or whatever, it first sends an HTTP header to tell what kind of information is being sent. For example, when a web page is sent, the MIME type is
text/html. The MIME type for MIDI is
audio/midi. The server usually (but not always) determines the data type from the file extension.
The standard file extensions for MIDI are ".mid" and ".midi". However, if the server doesn't recognize the extension, it won't send the correct MIME type. This is very often the problem with MIDI files on the web. (It's worth noting that this problem can actually happen with any type of media -- it just seems to happen very frequently with MIDIs.) MIDI has become popular enough that many people are using it on their web pages, but the web servers of the world have not all caught up and are sending bad mime types. Fortunately, this is an easy problem to solve. If you are having problems getting MIDIs from your web server, send a note like this to your web server administrator:
Could you configure the web server so that the mime type for
file extensions .mid and .midi is
audio/midi? Thanks! :-)
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of
the Open Content License and the Open Publication License.
Contents may be redistributed or republished freely under these terms so long as credit to the original creator and
contributors is maintained.