Analyze Your Website’s TTFB (Time to First Byte)

I’ve been using online services to analyze TTFB (time to first byte) or TTFB check using curl command line. High TTFB will often cause your page loads to be mysteriously slow or at the very least increase the latency between page loads. You should check to see if your TTFB is a performance issue or not. Try to keep TTFB under 300 milliseconds, repeat visits/tests should be even lower. To successfully troubleshoot and lower your TTFB you may need professional help.

 

What is TTFB?

Time spent waiting for the initial response, also known as the Time To First Byte. This time captures the latency of a round trip to the server in addition to the time spent waiting for the server to deliver the response. (Source: developers.google.com) High TTFB usually reveals one of two issues. Either poor network conditions between client and server or slowly responding web application/server. Also see: 100+ Top Server Monitoring & Application Monitoring Tools.

 

TTFB check using CURL

Here’s a quick example using CURL to check TTFB from your Linux or Mac terminal app. Use the following command replacing “https://haydenjames.io/” with your domain:

curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" https://haydenjames.io/

Example output:

 % Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
100 130k 0 130k 0 0 450k 0 --:--:-- --:--:-- --:--:-- 451k
Connect: 0.017 TTFB: 0.247 Total time: 0.289

 

Additional TTFB check methods (using web browser)

ttfb check

In addition to curl, you can check TTFB using these tools.

Updated: February 19th 2018

 

Tags: , , ,