Get IE 11 build number from javascript

对着背影说爱祢 提交于 2019-12-30 17:32:29

问题


TL;DR - How do I get the build number of IE 11 in javascript?

I had a bug that was fixed at some point between versions 11.0.1 and 11.0.7. I'd like to know the percentage of users that are experiencing the issue.

Basicly I would want to get this number:


回答1:


I don't think this is possible using just JavaScript. Microsoft is trying to hide the fact that IE11 actually is an Internet Explorer, see http://www.nczonline.net/blog/2013/07/02/internet-explorer-11-dont-call-me-ie/.

Therefore, even the user agent of an IE11 now looks like this:

Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; InfoPath.3; rv:11.0) like Gecko 

The Update Version is stored in the Windows Registry, you can find it under

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\svcUpdateVersion

However, it is not possible (rightly so!) to access the Windows Registry through JavaScript. VBScript is technically able to access the registry, but caused previous versions of IE to display a warning dialog ("Active Content blocked"). In IE11, Microsoft has removed support for VBScript entirely, see https://msdn.microsoft.com/en-us/library/dn384057%28v=vs.85%29.aspx.

I would try to find a different approach to resolve your problem, not relying on the update version. If you're desperate though, it might be helpful comparing .NET versions (which are available in the User Agent) with corresponding IE versions but personally I don't think it's worth the effort looking into that.



来源:https://stackoverflow.com/questions/31916007/get-ie-11-build-number-from-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!