CityHost.UA
Help and support

Server Response Time Analysis (TTFB)

Time to First Byte (TTFB), or response time from the server — is the time to receive the first byte of a web page after sending a request from the client's browser. The lower this indicator is, the more likely it is to say that the site works as it should and consider it fast. TTFB is measured in milliseconds.

There are many tools for checking TTFB: starting from commands for the Linux terminal and various third-party online services, ending with built-in tools in the usual Internet browsers for the user. In this example, we will look at viewing TTFB using the Google Chrome browser, but the process is not much different in other browsers.

How to check TTFB in Google Chrome:

  1. Open an empty tab and press the F12 key
  2. In developer tools, go to the Network tab
  3. Enter the link to your site in the address bar of the browser and press the Enter key
  4. The entire process of loading the site will be displayed on the Network tab .
  5. In the list of downloaded elements of the Network tab, find the first one and click on it with the left mouse button
  6. An additional panel will open, where the Timing tab should open by default
  7. Among the displayed information, we find the line Waiting (TTFB) — this is our desired response time from the server.

TTFB can be affected by many factors, but in most cases it all depends on the quality of site optimization that was carried out by the site developer during its creation. Among the factors that affect TTFB are the presence of "heavy" non-optimized scripts and database queries, slow queries, access to third-party APIs during the download process, lack of caching and data compression, the size and number of static files, and other factors...

What can be done from the site:

Configure content caching and compression, use the HTTP / 2 protocol, analyze downloads and the presence of "heavy" scripts and slow requests to the database. In general, optimizing the site's loading speed is a very complex process that is better entrusted to a site developer or a specialized specialist.

What can be done from the hosting side:

  1. Switch to a more current version of PHP, provided that the site can work with new versions.
  2. Use the built-in Google PageSpeed optimization module
  3. Use OPcache caching (no additional site configuration required)
  4. Use Memcached or Redis caching (requires additional site configuration)
  5. Configure caching of static files
  6. Enable gzip content compression

Similar articles