Summary
PerformanceNavigation
接口呈现了如何导航到当前文档的信息。
这个类型的对象可以被只读属性Performance.navigation
调用。
Properties
PerformanceNavigation
接口不继承任何属性。
PerformanceNavigation.type
只读- 一个无符号短整型,表示是如何导航到这个页面的。可能的值如下:
TYPE_NAVIGATE
(0)- 当前页面是通过点击链接,书签和表单提交,或者脚本操作,或者在url中直接输入地址,type值为0
TYPE_RELOAD
(1)- 点击刷新页面按钮或者通过
Location.reload()
方法显示的页面,type值为1 - The page was accessed by clicking the Reload button or via the
Location.reload()
method. TYPE_BACK_FORWARD
(2)- 页面通过历史记录和前进后退访问时。type值为2
TYPE_RESERVED
(255)- 任何其他方式,type值为255
PerformanceNavigation.redirectCount
只读- 无符号短整型,表示在到达这个页面之前重定向了多少次。
Methods
Performance
接口没有继承任何方法
PerformanceNavigation.toJSON()
- 把
PerformanceNavigation
转换成JSON对象
Specifications
Specification | Status | Comment |
---|---|---|
Navigation Timing PerformanceNavigation |
Recommendation | Initial definition. |
Browser compatibility
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- The
Performance
that allows access to an object of this type. PerformanceNavigationTiming
(part of Navigation Timing Level 2)