检查浏览器支持的特定Mime类型吗? [英] Check Browser Support for specific Mime Type?
本文介绍了检查浏览器支持的特定Mime类型吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于允许在浏览器中预览文档的Web应用程序,我想检查用户的浏览器是否支持当前文档的mime类型的预览.
For a web application which allows in-browser preview of documents, I'd like to check whether the user's browser supports preview of the current document's mime type.
是否存在基于Javascript的方式来将当前的mime类型与浏览器支持的类型进行匹配?
Is there a Javascript-based way to match the current mime type against the types supported by the browser?
谢谢!
推荐答案
在最近的浏览器中,有navigatior.plugins类似于数组的对象.您可以检查每个插件的MIME类型.
In recent browsers there are navigatior.plugins array-like object. You can check each plugin for your mime type.