navigator.mimeTypes

JavaScript 1.1+ Nav3+, Opera3+ Syntax

navigator.mimeTypes

Description

The mimeTypes property of the navigator object is used to obtain a list of all the MIME types supported by the browser. The returned object is an array containing all supported MIME types. The mimetypes array contains all the properties of the Array object.

Example

Listing 7.401 shows an example of how the mimeTypes property is used.

Listing 7.401 Example of the mimeTypes Property
 <html> <head> <title> Example of the mimetypes property of the navigator object</title> </head> <body> <script language="JavaScript"> <!--Hide // output the navigator mimeTypes length property document.write(navigator.mimeTypes.length); // End Hide ---> </script> </body> ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.