Web/API/PerformanceNavigationTiming

From Get docs

This is an experimental technologyCheck 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.

Properties

This interface extends the following PerformanceEntry properties for navigation performance entry types by qualifying and constraining them as follows:

PerformanceEntry.entryType Read only
Returns "navigation".
PerformanceEntry.name Read only
Returns the document's address.
PerformanceEntry.startTime Read only
Returns a DOMHighResTimeStamp with a value of "0".
PerformanceEntry.duration Read only
Returns a timestamp that is the difference between the PerformanceNavigationTiming.loadEventEnd and PerformanceEntry.startTime properties.

This interface also extends following PerformanceResourceTiming properties for navigation performance entry types by qualifying and constraining them as follows:

PerformanceResourceTiming.initiatorTypeRead only
Returns "navigation".

The interface also supports the following properties:

PerformanceNavigationTiming.domComplete Read only
A 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
A DOMHighResTimeStamp representing the time value equal to the time immediately after the current document's DOMContentLoaded event completes.
PerformanceNavigationTiming.domContentLoadedEventStart Read only
A 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
A 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
A DOMHighResTimeStamp representing the time when the load event of the current document is completed.
PerformanceNavigationTiming.loadEventStart Read only
A DOMHighResTimeStamp representing the time value equal to the time immediately before the load event of the current document is fired.
PerformanceNavigationTiming.redirectCount Read only
A number representing the number of redirects since the last non-redirect navigation under the current browsing context.
If there was no redirect, or if the redirect was from another origin, and that origin does not permit it's timing information to be exposed to the current origin then the value will be 0.
PerformanceNavigationTiming.requestStart Read only
A DOMHighResTimeStamp representing the time immediately before the user agent starts requesting the resource from the server, or from relevant application caches or from local resources.
PerformanceNavigationTiming.responseStart Read only
A DOMHighResTimeStamp representing the time immediately after the user agent's HTTP parser receives the first byte of the response from relevant application caches, or from local resources or from the server.
PerformanceNavigationTiming.type Read only
A string representing the navigation type. Must be: "navigate", "reload", "back_forward" or "prerender".
PerformanceNavigationTiming.unloadEventEnd Read only
A 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
A DOMHighResTimeStamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.

Methods

PerformanceNavigationTiming.toJSON()
Returns a DOMString that is the JSON representation of the PerformanceNavigationTiming object.

Specifications

Specification Status Comment
Navigation Timing Level 2The definition of 'PerformanceNavigationTiming' in that specification. Working Draft Initial definition.

Browser compatibility

Update compatibility data on 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

PerformanceNavigationTiming

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox Full support 58

Notes'

Full support 58

Notes'

Notes' You can disable this feature using the dom.enable_performance_navigation_timing preference (see bug 1403926).

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android Full support 58

Notes'

Full support 58

Notes'

Notes' You can disable this feature using the dom.enable_performance_navigation_timing preference (see bug 1403926).

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

domComplete

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

domContentLoadedEventEnd

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

domContentLoadedEventStart

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

domInteractive

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

loadEventEnd

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

loadEventStart

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

redirectCount

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

toJSON

Experimental'

Chrome

Full support 57

Edge

Full support ≤18

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

type

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

unloadEventEnd

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

unloadEventStart

Experimental'

Chrome

Full support 57

Edge

Full support 12

Firefox

Full support 58

IE

No support No

Opera

Full support 44

Safari

No support No

WebView Android

Full support 57

Chrome Android

Full support 57

Firefox Android

Full support 58

Opera Android

Full support 43

Safari iOS

No support No

Samsung Internet Android

Full support 7.0

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.'
Experimental. Expect behavior to change in the future.
See implementation notes.'
See implementation notes.


See also