asp.net.ph

Skip Navigation Links

mimeTypes Collection

DHTML Collections


Netscape Navigator® 3 up only.

Returns a reference to the collection of all Multipart Internet Mail Extension ( MIME ) types supported by the browser.

Syntax


[ collMimeTypes = ] navigator.mimeTypes
[ oObject = ] navigator.mimeTypes ( iIndex )

Possible Values


collMimeTypes Reference to an array of elements contained by the object.
oObject Reference to an individual item in the array of elements contained by the object.
iIndex Integer indicating the item to be returned.

Remarks

mimeTypes is an array of all MIME types supported by the client, either internally, via helper applications, or by plug-ins. Each element of the array is a mimeType object, which has properties for its type, description, file extensions, and enabled plug-ins.

For example, the following table summarizes the values for displaying JPEG images.

Expression Value
navigator.mimeTypes [ "image/jpeg" ].type image/jpeg
navigator.mimeTypes [ "image/jpeg" ].description JPEG Image
navigator.mimeTypes [ "image/jpeg" ].suffixes jpeg, jpg, jpe, jfif, pjpeg, pjp
navigator.mimeTypes [ "image/jpeg" ].enabledPlugin null

This property returns an empty collection for Internet Explorer®.

Example

The following script checks to see whether the client is capable of displaying QuickTime movies.

var mType = navigator.mimeTypes [ "video/quicktime" ] ;
if ( mType )
  document.write ( "Click here to see a " + mType.description )
else
  document.write ( "Too bad, can't show you any movies." ) 
Applies To

navigator



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note