This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The PerformanceNavigationTiming interface provides methods and properties to store and retrieve metrics regarding the browser's document navigation events. For example, this interface can be used to determine how much time it takes to load or unload a document.
This interface extends the following PerformanceEntry properties for navigation performance entry types by qualifying and constraining them as follows:
PerformanceEntry.entryType Read only
"navigation".PerformanceEntry.name Read only
PerformanceEntry.startTime Read only
DOMHighResTimeStamp with a value of "0".PerformanceEntry.duration Read only
timestamp that is the difference between the PerformanceNavigationTiming.loadEventEnd and PerformanceEntry.startTime properties.The interface also supports the following properties:
PerformanceNavigationTiming.domComplete Read only
DOMHighResTimeStamp representing a time value equal to the time immediately before the browser sets the current document readiness of the current document to complete.PerformanceNavigationTiming.domContentLoadedEventEnd Read only
DOMHighResTimeStamp representing the time value equal to the time immediately after the current document's DOMContentLoaded event completes.PerformanceNavigationTiming.domContentLoadedEventStart Read only
DOMHighResTimeStamp representing the time value equal to the time immediately before the user agent fires the DOMContentLoaded event at the current document.PerformanceNavigationTiming.domInteractive Read only
DOMHighResTimeStamp representing a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.PerformanceNavigationTiming.loadEventEnd Read only
DOMHighResTimeStamp representing the time when the load event of the current document is completed.PerformanceNavigationTiming.loadEventStart Read only
DOMHighResTimeStamp representing the time value equal to the time immediately before the load event of the current document is fired.PerformanceNavigationTiming.redirectCount Read only
PerformanceNavigationTiming.type Read only
string representing the navigation type. Must be: "navigate", "reload", "back_forward" or "prerender".PerformanceNavigationTiming.unloadEventEnd Read only
DOMHighResTimeStamp representing the time value equal to the time immediately after the user agent finishes the unload event of the previous document.PerformanceNavigationTiming.unloadEventStart Read only
DOMHighResTimeStamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.PerformanceNavigationTiming.toJSON()
DOMString that is the JSON representation of the PerformanceNavigationTiming object.| Specification | Status | Comment |
|---|---|---|
| Navigation Timing Level 2 The definition of 'PerformanceNavigationTiming' in that specification. | Working Draft | Initial definition. |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | 57 | Yes | 58
|
No | 44 | No |
domComplete
|
57 | 12 | 58 | No | 44 | No |
domContentLoadedEventEnd
|
57 | 12 | 58 | No | 44 | No |
domContentLoadedEventStart
|
57 | Yes | 58 | No | 44 | No |
domInteractive
|
57 | 12 | 58 | No | 44 | No |
loadEventEnd
|
57 | 12 | 58 | No | 44 | No |
loadEventStart
|
57 | Yes | 58 | No | 44 | No |
redirectCount
|
57 | 12 | 58 | No | 44 | No |
type
|
57 | 12 | 58 | No | 44 | No |
unloadEventEnd
|
57 | 12 | 58 | No | 44 | No |
unloadEventStart
|
57 | Yes | 58 | No | 44 | No |
toJSON
|
57 | Yes | 58 | No | 44 | No |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | 57 | 57 | Yes | 58
|
44 | No | 7.0 |
domComplete
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
domContentLoadedEventEnd
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
domContentLoadedEventStart
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
domInteractive
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
loadEventEnd
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
loadEventStart
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
redirectCount
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
type
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
unloadEventEnd
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
unloadEventStart
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
toJSON
|
57 | 57 | Yes | 58 | 44 | No | 7.0 |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming