Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. PerformanceNavigationTiming

PerformanceNavigationTiming

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨October 2021⁩.

* Some parts of this feature may have varying levels of support.

ThePerformanceNavigationTiming 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.

Only the current document is included in the performance timeline, so there is only onePerformanceNavigationTiming object in the performance timeline. It inherits all of the properties and methods ofPerformanceResourceTiming andPerformanceEntry.

PerformanceEntry PerformanceResourceTiming PerformanceNavigationTiming

The following diagram shows all of the timestamp properties defined inPerformanceNavigationTiming.

Timestamp diagram listing timestamps in the order in which they are recorded for the fetching of a document

Instance properties

This interface extends the followingPerformanceEntry properties by qualifying and constraining them as follows:

PerformanceEntry.entryTypeRead only

Returns"navigation".

PerformanceEntry.nameRead only

Returns thedocument's URL.Note thattext fragments, and any other fragment directives, are stripped from the URL.

PerformanceEntry.startTimeRead only

Returns aDOMHighResTimeStamp with a value of0.

PerformanceEntry.durationRead only

Returns atimestamp that is the difference between thePerformanceNavigationTiming.loadEventEnd andPerformanceEntry.startTime properties.

This interface also extends the followingPerformanceResourceTiming properties by qualifying and constraining them as follows:

PerformanceResourceTiming.initiatorTypeRead only

Returns"navigation".

The interface also supports the following properties:

PerformanceNavigationTiming.activationStartRead onlyExperimental

ADOMHighResTimeStamp representing the time between when a document starts prerendering and when it is activated.

PerformanceNavigationTiming.criticalCHRestartRead onlyExperimental

ADOMHighResTimeStamp representing the time at which the connection restart occurred due toCritical-CH HTTP response header mismatch.

PerformanceNavigationTiming.domCompleteRead only

ADOMHighResTimeStamp representing the time immediately before the user agent sets the document'sreadyState to"complete".

PerformanceNavigationTiming.domContentLoadedEventEndRead only

ADOMHighResTimeStamp representing the time immediately after the current document'sDOMContentLoaded event handler completes.

PerformanceNavigationTiming.domContentLoadedEventStartRead only

ADOMHighResTimeStamp representing the time immediately before the current document'sDOMContentLoaded event handler starts.

PerformanceNavigationTiming.domInteractiveRead only

ADOMHighResTimeStamp representing the time immediately before the user agent sets the document'sreadyState to"interactive".

PerformanceNavigationTiming.loadEventEndRead only

ADOMHighResTimeStamp representing the time immediately after the current document'sload event handler completes.

PerformanceNavigationTiming.loadEventStartRead only

ADOMHighResTimeStamp representing the time immediately before the current document'sload event handler starts.

PerformanceNavigationTiming.notRestoredReasonsRead onlyExperimental

ANotRestoredReasons object providing report data on reasons why the current document was blocked from using the back/forward cache (bfcache) on navigation.

PerformanceNavigationTiming.redirectCountRead only

A number representing the number of redirects since the last non-redirect navigation in the current browsing context.

PerformanceNavigationTiming.typeRead only

A string representing the navigation type. Either"navigate","reload", or"back_forward".

PerformanceNavigationTiming.unloadEventEndRead only

ADOMHighResTimeStamp representing the time immediately after the current document'sunload event handler completes.

PerformanceNavigationTiming.unloadEventStartRead only

ADOMHighResTimeStamp representing the time immediately before the current document'sunload event handler starts.

Instance methods

PerformanceNavigationTiming.toJSON()

Returns a JSON representation of thePerformanceNavigationTiming object.

Specifications

Specification
Navigation Timing Level 2
# sec-PerformanceNavigationTiming

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp