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