MimeType object (Object/browser)

An object representing a MIME type.

Availability:

JavaScript - 1.1
JScript - 3.0
Internet Explorer - 4.0
Netscape - 3.0
JavaScript syntax:-myMimeType = myWindow.navigator.mimeTypes[anIndex]
-myMimeType = navigator.mimeTypes[anIndex]
-myMimeType = myMimeTypeArray[anIndex]
Argument list:anIndexA reference to an element in a collection
Object properties:description, enabledPlugin, name, suffixes, type
Collections:suffixes[]

The example code fragment will list all the available MIME types supported by the browser.

Example code:

   // List the available mimeTypes in Netscape
   for(ii=0; ii<navigator.mimeTypes.length; ii++)
   {
      document.write(navigator.mimeTypes[ii].suffixes);
      document.write(" - ");
      document.write(navigator.mimeTypes[ii].type);
      document.write(" - ");
      document.write(navigator.mimeTypes[ii].description);
      document.write(" - ");
   
      if(navigator.mimeTypes[ii].enabledPlugin)
      {
         document.write(navigator.mimeTypes[ii].enabledPlugin.name);
      }
      else
      {
         document.write("<no_plugin>");
      }
      document.write("<BR>");
   }

See also:MIME types, MimeTypeArray object, Navigator.mimeTypes[]

PropertyJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
description1.1 1.13.0 3.03.0 3.04.0 4.0 n/a n/a n/a n/a n/a n/aReadOnly.
enabledPlugin1.1 1.13.0 3.03.0 3.04.0 4.0 n/a n/a n/a n/a n/a n/aReadOnly.
name1.5 1.55.0 5.06.0 6.05.0 5.0 n/a n/a n/a n/a n/a n/aReadOnly.
suffixes1.1 1.13.0 3.03.0 3.04.0 4.0 n/a n/a n/a n/a n/a n/a-
type1.1 1.13.0 3.03.0 3.04.0 4.0 n/a n/a n/a n/a n/a n/aReadOnly.