返回所使用浏览器的构建标识符。现代浏览器中,这个属性返回一个固定的时间戳作为私有的计量方法,比如 Firefox 64 及以后的版本返回 20181001000000

语法

buildID = navigator.buildID;

一个字符串,用来表示当前应用的构建标识。构建 ID 的格式为:YYYYMMDDHHMMSS

示例

console.log(window.navigator.buildID); 

规范

未得到任何公共标准支持。

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
buildID
Non-standard
Chrome No support NoEdge ? Firefox Full support 64
Notes
Full support 64
Notes
Notes Returns a fixed timestamp as a privacy measure - 20181001000000.
Full support 2
IE ? Opera ? Safari ? WebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 64
Notes
Full support 64
Notes
Notes Returns a fixed timestamp as a privacy measure - 20181001000000.
Full support Yes
Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
See implementation notes.
See implementation notes.

另请参阅

navigator.buildID 现在返回一个固定的时间戳。

文档标签和贡献者

标签: 
此页面的贡献者: mdnwebdocs-bot, Roy-Tian, teoli, khalid32, ziyunfei
最后编辑者: mdnwebdocs-bot,