URLResponseTime

URLResponseTime[url]

gives the total number of seconds to request one byte from the specified URL.

URLResponseTime[url,prop]

gives the specified timing.

Details and Options

  • The URL may be specified as "url" or URL["url"]. 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, URLResponseTime returns $Failed.
  • Possible properties in URLResponseTime include:
  • Allan association of all timings
    "ConnectionTimes"an association of timings related to connection steps
    "HostConnection"time until connection to host is established
    "HTTPRedirect"time spent on all redirection steps, if any
    "NameLookup"time until DNS lookup completed
    "PreTransfer"time to complete all steps prior to data transfer initiation
    "SSLHandshake"time until SSL handshake completed
    "TransactionTotal"total time for the complete request
    "TransferInitiation"time until the first byte of data is received
  • URLResponseTime[url] is equivalent to URLResponseTime[url,"TransactionTotal"].
  • URLResponseTime takes the following option:
  • TimeConstraint 60time to wait for URL to respond
  • Option settings t are interpreted as t seconds. Settings involving Quantity can also be used.

Examples

open allclose all

Basic Examples  (1)

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

Scope  (6)

DNS lookup time:

Find the time elapsed to make a connection:

Find the time to complete the SSL handshake:

Elapsed time from start until the first byte is received:

Total time to complete the request:

Find all elapsed times:

Request only times related to connecting to the host:

URLResponseTime supports IPAddress objects:

Options  (1)

TimeConstraint  (1)

Properties & Relations  (2)

"TransactionTotal" is the default property:

URLResponseTime[host] will report the time to open a connection to the web server:

PingTime gives the time to ping the host without opening any connection:

When both are available, PingTime will generally be faster:

Wolfram Research (2017), URLResponseTime, Wolfram Language function, https://reference.wolfram.com/language/ref/URLResponseTime.html.

Text

Wolfram Research (2017), URLResponseTime, Wolfram Language function, https://reference.wolfram.com/language/ref/URLResponseTime.html.

CMS

Wolfram Language. 2017. "URLResponseTime." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/URLResponseTime.html.

APA

Wolfram Language. (2017). URLResponseTime. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/URLResponseTime.html

BibTeX

@misc{reference.wolfram_2024_urlresponsetime, author="Wolfram Research", title="{URLResponseTime}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/URLResponseTime.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_urlresponsetime, organization={Wolfram Research}, title={URLResponseTime}, year={2017}, url={https://reference.wolfram.com/language/ref/URLResponseTime.html}, note=[Accessed: 22-November-2024 ]}