从javascript获取IE 11内部版本号 [英] Get IE 11 build number from javascript

查看:116
本文介绍了从javascript获取IE 11内部版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TL; DR - 如何在javascript中获取IE 11的内部版本号?

我有一个修复过的错误版本11.0.1和11.0.7之间的某些点。我想知道遇到此问题的用户百分比。

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:

推荐答案

我认为只使用JavaScript是不可能的。微软试图掩盖IE11实际上是Internet Explorer的事实,请参阅 http://www.nczonline.net/blog/2013/07/02/internet-explorer-11-dont-call-me-ie/

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/.

因此,即使IE11的用户代理现在看起来像这样:

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 

更新版本存储在Windows注册表中,你可以在

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

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\svcUpdateVersion

但是,通过JavaScript访问Windows注册表是不可能的(这是正确的!)。 VBScript在技术上能够访问注册表,但导致以前版本的IE显示警告对话框(Active Content blocked)。在IE11中,Microsoft已完全删除对VBScript的支持,请参阅 https://msdn.microsoft.com/en-us/library/dn384057%28v=vs.85%29.aspx

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.

我会尝试找到一种不同的方法来解决您的问题,而不是依赖于更新版本。如果你很绝望,将.NET版本(用户代理中可用的)与相应的IE版本进行比较可能会有所帮助,但我个人认为不值得努力。

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.

这篇关于从javascript获取IE 11内部版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆