loading...
Cover image for Check quickly the TTFB via terminal

Check quickly the TTFB via terminal

rafaelcg profile image Rafael Corrêa Gomes ・2 min read

For a long time, an alias helped me to return the TTFB during my dev tests, and talking with beginner developers I noticed that something small as an alias could be simpler, so I created a simple and developer-friendly tool to help beginners in a developer team to have access to this solution.

To install the TTFB Terminal you just need to run the command below.

bash <(curl -s https://raw.githubusercontent.com/rafaelstz/ttfb-terminal/master/setup-ttfb)

ttfb terminal - rafael correa gomes

Why?

You can use this tool to check the server response and detect some kind of issues, for example:

  • Network issues
  • Dynamic content creation
  • Web server configuration
  • Amount of traffic

What's TTFB?

According to KeyCDN. TTFB, which stands for time to the first byte, is the amount of time it takes from when a client makes an HTTP request to it receiving its first byte of data from the webserver. TTFB is an important aspect of website optimization since the faster the TTFB, the faster the requested resource can start being delivered to the browser.

The time to the first byte is made up of three separate components.

  • The time needed to send the HTTP request
  • The time needed for the server to process the request
  • The time needed for the server to send back the first byte of the response to the client

Thanks!

How do you usually check the TTFB? Do you know some other alias that can easily become a tool? Let me know in the comments below.

Discussion

markdown guide