Hello to all my dear friends!
In this post I will describe how you can measure any website time. The total time a website takes to load using cURL command. cURL is the all time famous CLI tool. I have used it since the beginning of my career. But it is just today that I came to know that cURL stands for Client for URLs
:). This is funny.
Measure Loading Time using cURL
curl -s -w '%{time_total}' https://thestorywire.com -o /dev/null
0.107616
cURL options
- “-s” is used to keep curl silent. It does not print progress meter and error message.
- “-w” is used to write a particular piece of information after the transfer to stdout.
- “time_total” is the total time in seconds curl took to complete the operation including dns connection, time to first byte, etc. Here it took .11 secs that comes out to be 110 ms for the website thestorywire.com.
- “-o /dev/null” means that the website content is sent to null instead of printing it on stdout or saving it in a file.
There is one important thing to note. cURL does not load the images or javascript or cookies or other included files. It just fetches the static html content. Therefore, the time taken by curl will always be less than the time it takes to load the same website in the web browser.