<head> of your html document
<script type="text/javascript">
function GetMimeTypes1 () {
var message1 = "";
// Internet Explorer supports the mimeTypes collection, but it is always empty.
if (navigator.mimeTypes && navigator.mimeTypes.length > 0) {
var mimes1 = navigator.mimeTypes;
for (var i=0; i < mimes1.length; i++) {
message1 += " " + mimes1[i].type + " (" + mimes1[i].description + ")<br />";
}
}
else {
message1 = "Your browser does not support this example";
}
var info1 = document.getElementById ("info1");
info1.innerHTML = message1;
}
</script>
<body> tag
onload="GetMimeTypes1()"
E.g., <body id="bodyId" onload="GetMimeTypes1();GetPlugins()">
<body>
<p id="info1"></p>
Browser Mime Types - Displays:
Save the following script as mimetypes.js
<!--
function GetMimeTypes2 () {
var message2 = "";
// Internet Explorer supports the mimeTypes collection, but it is always empty.
if (navigator.mimeTypes && navigator.mimeTypes.length > 0) {
var mimes2 = navigator.mimeTypes;
for (var i=0; i < mimes2.length; i++) {
message2 += " " + mimes2[i].type + " (" + mimes2[i].description + ")<br />";
}
}
else {
message2 = "Your browser does not support this example";
}
var info2 = document.getElementById ("info2");
info2.innerHTML = message2;
}
//-->
<head> of your html document
<script src="/js/mimetypes.js" type="text/javascript"></script>
<body> tag
onload="GetMimeTypes2()"
E.g., <body id="bodyId" onload="GetMimeTypes2();GetPlugins()">
<body>
<p id="info2"></p>
Browser Mime Types - Displays:
An internet media type, originally called a MIME type, after MIME (Multipurpose Internet Mail Extensions), and sometimes a Content-type after the name of a header in several protocols whose value is such a type, is a two-part identifier for file formats on the internet. The identifiers were originally defined in RFC 2046 for use in email sent through SMTP, but their use has expanded to other protocols such as HTTP, RTP, and SIP. A media type is composed of at least two parts: a type, a subtype, and one or more optional parameters. For example, subtypes of text have an optional charset parameter that can be included to indicate the character encoding, e.g., "text/html; charset=UTF-8," and subtypes of multi-part type often define a boundary between parts. Allowed charset values are defined in the list of IANA character sets. Types or subtypes that begin with x- are non-standard as they are not registered with IANA. Subtypes that begin with vnd. are vendor-specific. Subtypes in the personal or vanity tree begin with prs. MIME is short for Multipurpose Internet Mail Extensions, a specification for formatting non-ASCII messages so that they can be sent over the internet. Many email clients now support MIME, which enables them to send and receive graphics, audio, and video files via the internet mail system. There are many pre-defined media types, such as GIF graphics files and PostScript files. It is also possible to define custom media types. In addition to email applications, web browsers also support various media types. This enables the browser to display or output files that are not in HTML format. Media type specification is also an important information for search engines for the classification of data files on the web. MIME was defined in 1992 by the Internet Engineering Task Force (IETF). A new version, called S/MIME, supports encrypted messages.