156 New! Save questions or answers and organize your favorite content. I have a query which involves getting a list of user from a table in sorted order based on at what time it was created. I got the following timing diagram from the chrome developer tools. You can see that TTFB (time to first byte) is too high.
Web_Designer 69.9k89 gold badges203 silver badges261 bronze badges asked Feb 18, 2015 at 10:08
3 The TTFB is not the time to first byte of the body of the response (i.e., the useful data, such as: json, xml, etc.), but rather the time to first byte of the response received from the server. This byte is the start of the response headers. For example, if the server sends the headers before doing the hard work (like heavy SQL), you will get a very low TTFB, but it isn't "true". In your case, TTFB represents the time you spend processing data on the server. To reduce the TTFB, you need to do the server-side work faster.
Sam 7,16515 gold badges45 silver badges65 bronze badges answered May 20, 2015 at 18:30
4
I have met the same problem. My project is running on the local server. I checked my php code.
I use
BuZZ-dEE 5,32310 gold badges62 silver badges91 bronze badges answered Apr 6, 2016 at 1:39
CH ChowCH Chow 4174 silver badges6 bronze badges 4 TTFB is something that happens behind the scenes. Your browser knows nothing about what happens behind the scenes. You need to look into what queries are being run and how the website connects to the server. This article might help understand TTFB, but otherwise you need to dig deeper into your application. answered Mar 4, 2015 at 11:10
AncientSwordRageAncientSwordRage 7,00314 gold badges82 silver badges163 bronze badges If you are using PHP, try using More info
answered Aug 2, 2015 at 21:49
I would suggest you read this article and focus more on how to optimize the overall response to the user request (either a page, a search result etc.) A good argument for this is the example they give about using gzip to compress the page. Even though ttfb is faster when you do not compress, the overall experience of the user is worst because it takes longer to download content that is not zipped.
Raptor 51.9k44 gold badges222 silver badges356 bronze badges answered Jul 6, 2015 at 9:22
MikeMike 3,0071 gold badge33 silver badges47 bronze badges 1 |