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

The Chromium OS Open Source

The Chromium open source project is one of the greatest open sourcing projects that have been going really great. This is one of the greatest users that work with Google Chrome OS along with new systems being introduced web.

DallasXtreme: A premier Ventrilo Server hosting provider

If you are looking for a premier service provider of Ventrilo server hosting, is a source that can really provide you what you want from such sort of services.

Google announced the introduction of a new data collection system in the browser

New technology will replace the FLoC algorithm developed in 2021

Intel Alder Lake-N processor specifications published

Intel has already released dozens of 12th-generation Core Alder Lake processors for desktops, laptops and ultra-thin laptops. Intel is preparing its Alder-Lake N system-on-a-chip, which has small, energy-efficient Gracemont cores.