Is the website able开发者_Python百科 to determine if a particular IE add on has been installed or not?
How do you have the web page detect the IE add on?
In general, no; however it depends on what the add-on does. If it modifies the web page in some way (e.g. removing ads) then it should be possible to use Javascript to detect if the current page has been modified.
If the addon is available via Javascript/ActiveX interface, its absense may be checked by catching an exception on calling some (missing) addon's function.
This way, checking for few common addons leads to nice browser's fingerprinting method. Refer to: http://www.informatica64.com/Wbfingerprinting/
No doubt you can detect most through JavaScript; it'd be addon-specific.
In IE just expose an Active X control from your add-on, and then instantiate it using new ActiveXControl()
inside a Javascript try {}
block. If it succeeds, your extension is installed. If it fails, probably not. You can even expose a .version()
method to get the version of the control.
精彩评论