NavigatorID.appVersion - Web APIs 编辑
Returns either "4.0
" or a string representing version information about the browser.
Syntax
window.navigator.appVersion
Value
Either "4.0
" or a string representing version information about the browser.
Example
alert('Your browser version is reported as ' + navigator.appVersion);
Notes
The window.navigator.userAgent
property may also contain the version number (for example "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape 6/6.1
"), but you should be aware of how easy it is to change the user agent string and "spoof" other browsers, platforms, or user agents, and also how cavalier the browser vendor themselves are with these properties.
The window.navigator.appVersion
, window.navigator.appName
and window.navigator.userAgent
properties have been used in "browser sniffing" code: scripts that attempt to find out what kind of browser you are using and adjust pages accordingly. This lead to the current situation, where browsers had to return fake values from these properties in order not to be locked out of some websites.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'NavigatorID.appVersion' in that specification. |
Living Standard | Initial definition |
Browser compatibility
BCD tables only load in the browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论