ping — measure a host's HTTP response time
SYNOPSIS
ping [-c count] <host>
DESCRIPTION
Since the browser cannot send ICMP, ping measures the round-trip time of HTTP (no-cors) requests to the host. It prints per-request detail then statistics (min/avg/max, loss). Four requests by default.
OPTIONS
-c count number of requests (1 to 20)
HOW IT WORKS
A real ping sends ICMP echo packets, which a web page is not allowed to do. Instead, each probe is an HTTP request to the host in no-cors mode: the browser cannot read the answer, but it can time how long the full round trip takes. That includes DNS, TCP and TLS setup on the first probe, so the first time is usually the highest.
USE CASES
- check that a website answers at all, and how fast, from your connection;
- compare the latency of several hosts or CDNs;
- spot an unstable network: failed probes, or a wide min/max spread.
NOTES
Times are HTTP round trips, higher than ICMP ping times for the same host. For a load test with percentiles, see httperf.
EXAMPLES
ping toinel.com ping -c 8 geeek.org