({{, (RefLink[URLResponseTime, paclet:ref/URLResponseTime])[url] 
gives the total number of seconds to request one byte from the specified URL.}, {, (RefLink[URLResponseTime, paclet:ref/URLResponseTime])[url,prop]
gives the specified timing.}})

OpenersNotesSection(Spacer1)Details and Options

The URL may be specified as "url" or (RefLink[URL, paclet:ref/URL])["url"]. (RefLink[IPAddress, paclet:ref/IPAddress])["host:protocol"] is also supported.

The URL given can be just a host name, in which case the default HTTP port (80) is assumed.

If a URL cannot be reached, (RefLink[URLResponseTime, paclet:ref/URLResponseTime]) returns (RefLink[$Failed, paclet:ref/$Failed]).

Possible properties in (RefLink[URLResponseTime, paclet:ref/URLResponseTime]) include:

(RefLink[URLResponseTime, paclet:ref/URLResponseTime])[url] is equivalent to (RefLink[URLResponseTime, paclet:ref/URLResponseTime])[url,"TransactionTotal"].

(RefLink[URLResponseTime, paclet:ref/URLResponseTime]) takes the following option:

Option settings t are interpreted as t seconds. Settings involving (RefLink[Quantity, paclet:ref/Quantity]) can also be used.

OpenersPrimaryExamplesSection(Spacer1)Examples  (10)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Find how long it takes to receive a byte from www.wolfram.com:

URLResponseTime["www.wolfram.com"]

OpenersExampleSection1(Spacer1)Scope  (6)

DNS lookup time:

URLResponseTime["www.wolframalpha.com","NameLookup"]

Find the time elapsed to make a connection:

URLResponseTime["www.wolfram.com","HostConnection"]

Find the time to complete the SSL handshake:

URLResponseTime[URL["https://www.wolframcloud.com"],"SSLHandshake"]

Elapsed time from start until the first byte is received:

URLResponseTime[URL["http://www.wolframalpha.com"],"TransferInitiation"]

Total time to complete the request:

URLResponseTime[URL["http://www.wolframalpha.com"],"TransactionTotal"]

Find all elapsed times:

URLResponseTime["https://www.wolframcloud.com",All]

Request only times related to connecting to the host:

URLResponseTime["https://www.wolfram.com","ConnectionTimes"]

(RefLink[URLResponseTime, paclet:ref/URLResponseTime]) supports (RefLink[IPAddress, paclet:ref/IPAddress]) objects:

HostLookup["www.wolfram.com"]

URLResponseTime[First@%]

OpenersExampleSection2(Spacer1)Options  (1)

OpenersExampleSubsection0(Spacer1)TimeConstraint  (1)

URLResponseTime["https://www.wolfram.com",TimeConstraint->Quantity[1,"Milliseconds"]]

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

"TransactionTotal" is the default property:

URLResponseTime["www.wolfram.com"]

URLResponseTime["www.wolfram.com","TransactionTotal"]

(RefLink[URLResponseTime, paclet:ref/URLResponseTime])[host] will report the time to open a connection to the web server:

URLResponseTime["www.wolfram.com"]

(RefLink[PingTime, paclet:ref/PingTime]) gives the time to ping the host without opening any connection:

PingTime["www.wolfram.com"]

When both are available, (RefLink[PingTime, paclet:ref/PingTime]) will generally be faster:

%/%%

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[PingTime, paclet:ref/PingTime])  ▪  (RefLink[AbsoluteTiming, paclet:ref/AbsoluteTiming])  ▪  (RefLink[URLRead, paclet:ref/URLRead])  ▪  (RefLink[URLExecute, paclet:ref/URLExecute])  ▪  (RefLink[$NetworkConnected, paclet:ref/$NetworkConnected])  ▪  (RefLink[NetworkPacketCapture, paclet:ref/NetworkPacketCapture])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Time Measurement & Optimization, paclet:guide/TimeMeasurementAndOptimization])}, {▪(RefLinkPlain[HTTP Requests & Responses, paclet:guide/HTTPRequestsAndResponses])}, {▪(RefLinkPlain[Network Programming, paclet:guide/NetworkProgramming])}})}})