-->

Querying browser-plugin existence/version/etc

2019-08-09 07:48发布

问题:

As far as IE, my understanding is you have to try and instantiate an ActiveXObject and then check this succeeds, and you can then query the version through the instanced plugin... nothing particularly exciting.

But on Firefox (and I think other NPAPI browsers) you can check for installed plugins and get the DLL name, etc (on Windows at least). What exactly can I find out about installed plugins other than if it exists? Plugin file name, anything else?

edit: And, does IE support any way of querying plugins without creating an instance, in newer versions?

回答1:

For Gecko, the properties are listed on MDN. On WebKit, you only have the ones labeled DOM 0 on MDN (although there is a proposal to add the version info to WebKit as well).



回答2:

Take a look at the navigator.plugins array, there you'll find a lot of info :)