connectStart property
Gets the time immediately before the user agent starts establishing the connection to the server to retrieve the document.
![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: Integer
Represents the time immediately before the user agent starts establishing the connection to the server to retrieve the document.
Standards information
- Navigation Timing, Section 4.2
Remarks
If a page is retrieved from an application cache, connectStart has the same value as fetchStart.
The value reported by the connectStart property represents the number of milliseconds between the recorded time and midnight January 1, 1970 (UTC).
Windows Internet Explorer 9. This property is supported only for documents displayed in IE9 Standards mode. For more information, see Defining Document Compatibility.
Examples
The following example shows how to calculate the amount of time needed to establish a connection for a document.
var oTiming = window.performance.timing; var iTimeMS = oTiming.connectEnd - oTiming.connectStart;
See also
