This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

PerformanceTiming

Summary

An interface that provides Web applications with timing-related information.

Properties

connectEnd
Returns the time immediately after the user agent finishes establishing the connection to the server to retrieve the current document.
connectStart
Returns the time immediately before the user agent start establishing the connection to the server to retrieve the document.
domComplete
Returns the time immediately before the user agent sets the current document readiness to "complete".
domContentLoadedEventEnd
Returns the time immediately after the document’s DOMContentLoaded event completes.
domContentLoadedEventStart
Returns the time immediately before the user agent fires the DOMContentLoaded event at the Document.
domInteractive
Returns the time immediately before the user agent sets the current document readiness to "interactive".
domLoading
Returns the time immediately before the user agent sets the current document readiness to "loading".
domainLookupEnd
Returns the time immediately after the user agent finishes the domain name lookup for the current document.
domainLookupStart
Returns the time immediately before the user agent starts the domain name lookup for the current document.
fetchStart
Returns the time immediately before the user agent starts checking any relevant application caches (if the resource is to be fetched using HTTP GET or equivalent). Otherwise, returns the time when the user agent starts fetching the resource.
loadEventEnd
Returns the time when the load event of the current document is completed, or returns zero when the load event is not fired or is not completed.
loadEventStart
Returns the time immediately before the load event of the current document is fired, or returns zero when the load event is not fired yet.
navigationStart
Returns the time immediately after the user agent finishes prompting to unload the previous document. If there is no previous document, returns the same value as fetchStart.
redirectEnd
Returns the time immediately after receiving the last byte of the response of the last redirect, if there are HTTP redirects or equivalent when navigating and all redirects and equivalents are from the same origin. Otherwise, returns zero.
redirectStart
Returns the starting time of the fetch that initiates the redirect, if there are HTTP redirects or equivalent when navigating and if all the redirects or equivalent are from the same origin,. Otherwise, returns zero.
requestStart
Returns the time immediately before the user agent starts requesting the current document from the server, or from relevant application caches or from local resources. If the transport connection fails after a request is sent and the user agent reopens a connection and resends the request, returns the corresponding values of the new request.
responseEnd
Returns the time immediately after the user agent receives the last byte of the current document from the server, relevant application caches or from local resources, or immediately before the transport connection is closed, whichever comes first.
responseStart
Returns the time immediately after the user agent receives the first byte of the response from the server, or from relevant application caches or from local resources.
secureConnectionStart
Returns the time immediately before the user agent starts the handshake process to secure the current connection, if the scheme of the current page is HTTPS. If HTTPS is not used, returns zero.
unloadEventEnd
Returns the time immediately after the user agent finishes the unload event of the previous document. If there is no previous document or the previous document has a different origin than the current document or the unload is not yet completed, returns zero.
unloadEventStart
Returns the time immediately before the user agent starts the unload event of the previous document. If there is no previous document or the previous document has a different origin than the current document, returns zero.

Methods

No methods.

Events

No events.

Notes

When a webpage is displayed in Windows Internet Explorer 9 mode, Windows Internet Explorer records timestamps that correspond to the time when various steps occurred during the process used to load a document. Each property of the performanceTiming object corresponds to one of these timestamps. This object is not supported for Metro style apps using JavaScript. The built-in performance marks occur in the following order:

  • navigationStart
  • redirectStart
  • unloadEventStart
  • unloadEventEnd
  • redirectEnd
  • fetchStart
  • domainLookupStart
  • domainLookupEnd
  • connectStart
  • connectEnd
  • requestStart
  • responseStart
  • responseEnd
  • domLoading
  • domInteractive
  • domContentLoadedEventStart
  • domContentLoadedEventEnd
  • domComplete
  • loadEventStart
  • loadEventEnd
  • msFirstPaint

The properties of the performanceTiming object represent the number of milliseconds that have elapsed between midnight January 1, 1970 and the time the measurement was recorded.

Related specifications

W3C Navigation Timing Specification
W3C Editor’s Draft

Attributions