简体   繁体   English

Windows 10 S用户代理字符串中的边缘? 以编程方式检测Windows 10 S的任何其他方法?

[英]Edge in Windows 10 S user agent string? Any other way to programmatically detect Windows 10 S?

Is there a way to know if the user is using Windows 10 S? 有没有办法知道用户是否使用Windows 10 S? Typically one would use the user-agent string to detect operating system and browser, but I do not believe that Edge on Windows 10 S will have a user-agent string any different from Edge on Windows 10 Home or Pro. 通常会使用用户代理字符串来检测操作系统和浏览器,但我不认为Windows 10 S上的Edge将具有与Windows 10 Home或Pro上的Edge不同的用户代理字符串。

Is there any other way to programmatically detect Windows 10 S from within the browser? 有没有其他方法可以从浏览器中以编程方式检测Windows 10 S?

To detect the operating system on the client machine, your script can analyze the value of two things: 要检测客户端计算机上的操作系统,您的脚本可以分析两件事的值:

  1. navigator.appVersion navigator.appVersion
  2. navigator.userAgent navigator.userAgent的

As we can see in Microsoft document that released on 12/15/2016 ( User-agent string changes for Microsoft Edge ), the Windows NT token's value changes from 6.3 to 10.0 in the EdgeHTML engine and after that Windows 10 S was released on May 2, 2017 that Microsoft didn't mention any changes in navigator.userAgent or navigator.appVersion . 正如我们在2016年12月15日发布的Microsoft文档中所看到的( Microsoft Edge的用户代理字符串更改 ),Windows NT令牌的值在EdgeHTML引擎中从6.3更改为10.0,之后Windows 10 S在5月发布2017年2月,微软没有在navigator.userAgentnavigator.appVersion提及任何变化。

So, Edge on Windows 10 S is no different than Edge on Windows 10 Home or Pro in both of two things above. 因此,Windows 10 S上的Edge与Windows 10 Home或Pro上的Edge在上述两个方面都没有区别

Another things that I should to say is: 我应该说的另一件事是:

userAgent is not reliable. userAgent不可靠。

New browsers may start using the same UA, or part of it, as an older browser: you really have no guarantee that the browser agent is indeed the one advertised by this property. 新浏览器可能会开始使用相同的UA或部分UA作为较旧的浏览器:您实际上无法保证浏览器代理确实是此属性所宣传的代理。 ( more information ) 更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从浏览器检测Windows 10 - Detect Windows 10 s from the browser 如何以编程方式获取ie10的REAL用户代理 - How to programmatically get ie10's REAL user agent Windows 10为浏览器的用户代理设置了什么操作系统名称? - What OS name does Windows 10 set to browser's user agent? 如何检测是否在Microsoft Edge / Windows 10上禁用了Cookie? - How to Detect if Cookies Are Disabled on Microsoft Edge / Windows 10? 如何在 Windows 10 上打开 package 启动 Edge - How to launch Edge with Open package on Windows 10 哪种方法可以更好地检测客户端的用户代理? - Which is a better way to detect a client's user-agent? 你能在Windows 10上使用JavaScript检测Edge和IE11中的“平板电脑模式”吗? - Can you detect “Tablet Mode” in Edge and IE11 using JavaScript on Windows 10? 有没有办法检测IE10的“Caps Lock is on”功能? - Is there a way how to detect IE10's “Caps Lock is on” feature? Cordova和Windows 10 Javascript应用程序有什么区别? - What's the difference between Cordova and Windows 10 Javascript Apps? Windows 10中的Chrome的HTML 5通知一次只能允许一个? - Chrome's HTML 5 notifications in Windows 10 only allow one at a time?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM