PerformanceNavigation

This interface is deprecated in the Navigation Timing Level 2 specification . Please use the PerformanceNavigationTiming interface instead.

传统 PerformanceNavigation interface represents information about how the navigation to the current document was done.

An object of this type can be obtained by calling the Performance.navigation read-only attribute.

特性

PerformanceNavigation interface doesn't inherit any properties.

PerformanceNavigation.type 只读
An unsigned short which indicates how the navigation to this page was done. Possible values are:
TYPE_NAVIGATE (0)
The page was accessed by following a link, a bookmark, a form submission, or a script, or by typing the URL in the address bar.
TYPE_RELOAD (1)
The page was accessed by clicking the Reload button or via the Location.reload() 方法。
TYPE_BACK_FORWARD (2)
The page was accessed by navigating into the history.
TYPE_RESERVED (255)
Any other way.
PerformanceNavigation.redirectCount 只读
An unsigned short representing the number of REDIRECTs done before reaching the page.

方法

Performance interface doesn't inherit any method s.

PerformanceNavigation.toJSON()
Is a jsonizer returning a json object representing the PerformanceNavigation 对象。

规范

规范 状态 Comment
导航计时
The definition of 'PerformanceNavigation' in that specification.
Recommendation 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
PerformanceNavigation
弃用
Chrome Yes Edge 12 Firefox 7 IE 9 Opera No Safari No WebView Android Yes Chrome Android Yes Firefox Android 7 Opera Android No Safari iOS No Samsung Internet Android Yes
redirectCount
弃用
Chrome Yes Edge 12 Firefox 7 IE 9 Opera No Safari No WebView Android Yes Chrome Android Yes Firefox Android 7 Opera Android No Safari iOS No Samsung Internet Android Yes
toJSON
弃用
Chrome 56 Edge 12 Firefox 25
25
This property can return incorrect values. See bug 1459711 .
IE 9 Opera No Safari No WebView Android 56 Chrome Android 56 Firefox Android 25
25
This property can return incorrect values. See bug 1459711 .
Opera Android No Safari iOS No Samsung Internet Android 6.0
type
弃用
Chrome Yes Edge 12 Firefox 7
7
This property can return incorrect values. See bug 1459711 .
IE 9 Opera No Safari No WebView Android Yes Chrome Android Yes Firefox Android 7
7
This property can return incorrect values. See bug 1459711 .
Opera Android No Safari iOS No Samsung Internet Android Yes

图例

完整支持
完整支持
不支持
不支持
弃用。不要用于新网站。
弃用。不要用于新网站。
见实现注意事项。

另请参阅