Using the mimeTypes Object : Mime Type « HTML « JavaScript DHTML






Using the mimeTypes Object

<HTML>
<HEAD>
<TITLE>Determining how MIME types are handled</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript"><!--
m = navigator.mimeTypes;
for(var i=0;i<m.length;++i){
 with(document){
  writeln('<P><B>MIME type: </B>'+m[i].type+'</P>')
  writeln('<P><B>Description: </B>'+m[i].description+'</P>')
  writeln('<P><B>Suffixes: </B>'+m[i].suffixes+'</P>')
  writeln('<HR>')
 }
}
// --></SCRIPT>
</BODY>
</HTML>

           
       








Related examples in the same category

1.Verifying a MIME Type
2.Verifying Plug-in and MIME Type
3.Show Browser Mime type (Firefox)
4. Properties of the Mimetype Object