[Chapter 21] Reference: MimeType
Author: David Flanagan
Date: Fri Aug 29 11:18:03 1997

#

| Chapter 21 JavaScript Reference |

# MimeType Object

## Name

MimeType Object---represents a MIME datatype

## Availability

Navigator 3.0

## Synopsis

    navigator.mimeTypes[i]
    navigator.mimeTypes["name"]
    navigator.mimeTypes.length

## Properties

`description`

  A read-only string that provides an English description of the content and encoding of the type.

`enabledPlugin`

  A reference to the Plugin object that supports this MIME type, or `null`, if no installed and enabled plug-in supports it.

`suffixes`

  A read-only string that specifies a comma-separated list of the common filename extensions associated with this MIME type.

`type`

  A read-only string that indicates the name of the MIME datatype, such as "text/html" or "video/mpeg".

## Description

The MimeType object represents a MIME type (i.e., a data format) supported by the browser. The format may be supported directly by the browser, or may be supported through an external "helper application," or a plug-in for embedded data.

## Usage

The `navigator.mimeTypes[]` array may be indexed numerically, or with the name of the desired MIME type (which is the value of the `type` property). In order to check which MIME types are supported by the browser, you can loop through each element in the array numerically. Or, if you just want to check whether a specific type is supported, you can write code like the following:

    var show_movie = (navigator.mimeTypes["video/mpeg"] != null);

## See Also

"Navigator", "Plugin"

Math.tan() |  | MimeType.description