How To Test Loading Speed of Website with Terminal

Discovering how fast a website loads is a vital factor for it to succeed, as fast response time establishes user confidence and aids smooth operation. This tutorial will demonstrate how to assess a website's speed using CURL through the Linux terminal, with essential parameters like resolving the domain name, establishing a TCP connection to the server, the file transfer, and so on.

Check Loading Speed of a Website on Linux

For this we open the terminal console and execute the following line with the name of the desired website:

curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null

In this command the variables that we have used are:

  • time_namelookup: It refers to the time, measured in seconds, of the total time the request was sent until it got a response.
  • time_connect: It covers all the time, in seconds, when the TCP protocol connection was completed to the remote computer.
  • time_pretransfer: It refers to the time, also in seconds, when the file transfer was started.
  • time_starttransfer: It comprises the time in which the first byte was about to be transmitted to the remote equipment.
  • time_total: It indicates the total time that was used, in seconds, to complete the response action by the remote team.

In the case of sites protected with HTTPS, we can execute the following:

curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nAppCon Time:\t\t%{time_appconnect}\nRedirect Time:\t\t%{time_redirect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null

In this case of HTTPS we have used the following variables:

  • time_appconnect: This value refers to the time measured in seconds of the entire SSL communication process between the source equipment and the remote equipment.
  • time_redirect: It is the time where the redirection process was involved, where actions such as connection, name analysis and more are included.

Each time we execute the command we will receive a new time due to the loads that the server may or may not be running at that moment.

We can use these options to know, in real time, what is the loading time of a website and we emphasize that it will always take a little longer, for security, to load a secure site.

In case of knowing more about CURL we can execute the following command:

man curl

As we see through these commands we can verify the loading speed in a website in Linux

It might be interesting

Japanese company unveils world’s smallest three-speaker headphones

It seems that Japanese firm Audio Technica hasn’t heard about the global financial squeeze yet, at least the release of some eye-wateringly expensive ear buds from hi-fi specialist Audio Technica suggests so.

Apple started test production of iPhone 14 smartphones

Apple has begun test production of the iPhone 14 smartphones. This was reported by the Taiwan Economic Daily resource. Test production is necessary for debugging the processes of mass production of devices.

Apple announces updated Xserve

Apple has just announced about an updated Xserve version that will be more than double in performance than the forerunner system.

MOTO ZN200: Nice looks with ordinary specs

Motorola is not willing to give up and the release of its pretty slider MOTO ZN200 is an evident proof of it. So, Samsung be not proud with your wide range of sliders and see what comes.