My wordpress blog is getting a grade F for TTFB on webpagetest.org: http://www.webpagetest.org/result/140905_20_PRX/

with a TTFB of over 800ms. I cannot explain it. Indeed, I use a CloudFlare CDN, apc for PHP, Total Cache plugin, KeepAlive connection and I get a grade A on YSlow.

Plus, CURL shows a much faster TTFB :

sam@ubuntu:~$ curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" http://mywebsite

results: Connect: 0,063 TTFB: 0,137 Total time: 0,220

So, can I trust webpagetest.org ? It is supposed to be pretty reliable but I have doubts. Anyone experienced slow TTFB without knowing why ?

  • You should run the test in multiple server locations multiple times, you should choose 20mpbs and tests 10... run at least 10 places.. if you have the same results then its obvious your server. – Simon Hayter Sep 5 '14 at 20:08
  • Also your CDN will not impact the first byte... and will be classified as DNS lookup and download time. Also, doing a resolve on your IP the geo of your server seems to be US yet your test displays Paris? – Simon Hayter Sep 5 '14 at 20:09
  • @bybe I think it shows US because of CloudFlare (based in the US). However my server is located in Paris. Funny, I just ran the test again several times and it shows grade B now ! I haven't changed anything at all on the server, hence my doubts about webpagetest.org showing consistent results. But what do I know... – Sam Sep 5 '14 at 20:20
  • 1
    Ya can see that, I just did a tracert. It's because the block of IPS they purchased has GEO location of US, nothing bad. Basiclly webpagetest is reliable and even as queue system to ensure that results are good, however what it doesn't take into count is congestion on the network i.e data center and hops it has to go through, this can impact the results and sometimes the hops are greater to some servers. To overcome this problem just test from multiple locations and click FOIS rather than DSL. – Simon Hayter Sep 5 '14 at 20:25

webpagetest.org tests reflect a user loading a page in a web browser - the results can vary from time to time for many reasons that will be out of your control. Following their tips will help you to improve this, though I would strongly recommend carefully thinking about when and how you load javascripts to reduce TTFB.

Read more:

Sometimes if your page has a large amount of content it can be beneficial to only include the introduction paragraphs and content in the page itself and then use AJAX to load into a div element the remaining content later on.

While CloudFlare can improve reliability, unless you are on a paid service you may not see a significant performance increase in Europe/U.S. unless you are using a low specification web server, typically the significant performance increases will be seen when testing from China, Brazil, India etc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.