The PerformanceTiming
interface contains properties that offer performance timing information for various events which occur during the loading and use of the current page. You get a PerformanceTiming
object describing your page using the window.performance.timing
property.
The PerformanceTiming
interface doesn't inherit any properties.
These properties each describe the time at which a particular point in the page loading process was reached. Some correspond to DOM events; others describe the time at which internal browser operations of interest took place. Each time is provided in milliseconds.
These properties are listed in the order in which they occur during the navigation process.
PerformanceTiming.navigationStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, right after the prompt for unload terminates on the previous document in the same browsing context. If there is no previous document, this value will be the same as PerformanceTiming.fetchStart
.PerformanceTiming.unloadEventStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, the unload
event has been thrown, indicating the time at which the previous document in the window began to unload. If there is no previous document, or if the previous document or one of the needed redirects is not of the same origin, the value returned is 0
.PerformanceTiming.unloadEventEnd
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, the unload
event handler finishes. If there is no previous document, or if the previous document, or one of the needed redirects, is not of the same origin, the value returned is 0
.PerformanceTiming.redirectStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, the first HTTP redirect starts. If there is no redirect, or if one of the redirects is not of the same origin, the value returned is 0
.PerformanceTiming.redirectEnd
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, the last HTTP redirect is completed, that is when the last byte of the HTTP response has been received. If there is no redirect, or if one of the redirects is not of the same origin, the value returned is 0
.PerformanceTiming.fetchStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, the browser is ready to fetch the document using an HTTP request. This moment is before the check to any application cache.PerformanceTiming.domainLookupStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, where the domain lookup starts. If a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as PerformanceTiming.fetchStart
.PerformanceTiming.domainLookupEnd
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, where the domain lookup is finished. If a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as PerformanceTiming.fetchStart
.PerformanceTiming.connectStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, where the request to open a connection is sent to the network. If the transport layer reports an error and the connection establishment is started again, the last connection establishment start time is given. If a persistent connection is used, the value will be the same as PerformanceTiming.fetchStart
.PerformanceTiming.connectEnd
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, where the connection is opened network. If the transport layer reports an error and the connection establishment is started again, the last connection establishment end time is given. If a persistent connection is used, the value will be the same as PerformanceTiming.fetchStart
. A connection is considered as opened when all secure connection handshake, or SOCKS authentication, is terminated.PerformanceTiming.secureConnectionStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, where the secure connection handshake starts. If no such connection is requested, it returns 0
.PerformanceTiming.requestStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, when the browser sent the request to obtain the actual document, from the server or from a cache. If the transport layer fails after the start of the request and the connection is reopened, this property will be set to the time corresponding to the new request.PerformanceTiming.responseStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, when the browser received the first byte of the response, from the server from a cache, or from a local resource.PerformanceTiming.responseEnd
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, when the browser received the last byte of the response, or when the connection is closed if this happened first, from the server, the cache, or from a local resource.PerformanceTiming.domLoading
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, when the parser started its work, that is when its Document.readyState
changes to 'loading'
and the corresponding readystatechange
event is thrown.PerformanceTiming.domInteractive
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, when the parser finished its work on the main document, that is when its Document.readyState
changes to 'interactive'
and the corresponding readystatechange
event is thrown.PerformanceTiming.domContentLoadedEventStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, right before the parser sent the DOMContentLoaded
event, that is right after all the scripts that need to be executed right after parsing has been executed.PerformanceTiming.domContentLoadedEventEnd
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, right after all the scripts that need to be executed as soon as possible, in order or not, has been executed.PerformanceTiming.domComplete
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, when the parser finished its work on the main document, that is when its Document.readyState
changes to 'complete'
and the corresponding readystatechange
event is thrown.PerformanceTiming.loadEventStart
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, when the load
event was sent for the current document. If this event has not yet been sent, it returns 0.
PerformanceTiming.loadEventEnd
Read only
unsigned long long
representing the moment, in milliseconds since the UNIX epoch, when the load
event handler terminated, that is when the load event is completed. If this event has not yet been sent, or is not yet completed, it returns 0.
The PerformanceTiming
interface doesn't inherit any methods.
PerformanceTiming.toJSON()
PerformanceTiming
object.Specification | Status | Comment |
---|---|---|
Navigation Timing The definition of 'PerformanceTiming' in that specification. | Recommendation | Initial definition. |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 6.0 | 12.0 | 7.0 (7.0) | 9.0 | 15.0 | 8.0 |
secureConnectionStart | 6.0 | (Yes) | 56 (56) | 9.0 | 15.0 | 9.0 |
toJSON() | 45.0 | ? | 25.0 (25.0) | 9.0 | No support | (Yes) |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 4.0 | (Yes) | 7.0 (7.0) | 9.0 | 15.0 | 9.2 |
secureConnectionStart | No support | (Yes) | 56.0 (56) | 9.0 | 15.0 | 9.0 |
toJSON() | No support | ? | 25.0 (25.0) | No support | (Yes) |
Performance.timing
property that creates such an object.
© 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/PerformanceTiming