WebPagetest Forums
TTFB slow - almost fully optimized WP site. After cache cleared faster TTFB - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: TTFB slow - almost fully optimized WP site. After cache cleared faster TTFB (/showthread.php?tid=15977)



TTFB slow - almost fully optimized WP site. After cache cleared faster TTFB - kevinp - 02-13-2020 10:28 PM

Hi all,

I'm currently working on a webshop (not launched yet). I try to optimze the WP webshop as much as possible.
I've some extensions installed like WP Rocket and currently working on http/2 but with combined cache (seems to load better then not combined js/css)...
I also use Cloudflare and i serve scaled images.

The problem is that im facing with a slow TTFB if the website is cached. If i clear my cache the website seems to be much faster due to the reduced TTFB (waiting) time. This will saves me 4/5 sec on the full run.

See below an example of the test with cache cleared and without...
Hopefully you guys can see/read what causes this delay...
And how to improve the first paint as example...
The loading time isn't probably the worst thing, i think the first pain of the site is most important...

The test results seems to be different based on the geo location as well (sometimes 1 - 2 sec.)

Cache NOT cleared:
https://www.webpagetest.org/result/200213_YX_01cf1614edd71acbe282ca2bdad44087/

cache cleared:
https://www.webpagetest.org/result/200213_1H_cea5fd387c47e5ee2c5a8d84f56d6850/


I also have some other tests running

Pingdom: https://tools.pingdom.com/#5c0fa0e6e6400000
GTmetrix : https://gtmetrix.com/reports/sexspeeltjekopen.nl/ImGnWNy4

Hope someone can help me reducing the waiting time and improving the load time + first paint Smile

Thanks !


RE: TTFB slow - almost fully optimized WP site. After cache cleared faster TTFB - greenjobs - 02-14-2020 06:34 PM

Hi,

I have no experience with Cloudflare, therefore I am not 100% how exactly they interact with your server. Furthermore, I do not understand whether you are talking about the local cache, in your case WP Rocket, or Cloudflare's (edge) cache.

But what I noticed in the long TTFB requests: The cache-control header sent by your server has a value of max-age=0. In these cases Cloudflare signals a cache-status of BYPASS. Thus the request has to go through to your origin server.

In the cases of short TTFB your server emits a cache-control header of max-age=16070400 and CF serves a file directly from its cache.

But even here the setup does not seem ideal: In addition to a cache-control header, your server also shows en expires header, with time set to the current time. Thus CF has to revalidate the page it cached due to the cache-control header. This can be seen here cf-cache-status: REVALIDATED

Maybe this helps you somehow. Good luck!


RE: TTFB slow - almost fully optimized WP site. After cache cleared faster TTFB - kevinp - 02-14-2020 06:51 PM

Hi @greenjobs,

Thanks for your response...
Do i need to share/upload any settings in
- WP Rocket
- Cloudflare and SLL settings here
- htaccess setting

let me know. anything to help Smile