Webpagetest.org TTFB different from different location

Hello,

My website shows everything perfect from Singapore but from other location specially from USA it shows long response time. any idea why?

below are two screen shots for references.

CDN should show similar performance from every region correct?

Thanks in advance.

You can expect similar performance for assets that are cached by Cloudflare, such as the image files on both tests. However, the TTFB has to do with the HTML, which Cloudflare does not cache by default. That means Cloudflare has to request it from your origin server, and the further the origin is from a given CF data center, the longer it will take to receive the response in time to forward it to the visitor.

You could create a “cache everything” page rule to make Cloudflare cache the generated HTML, but that has its side effects.

https://support.cloudflare.com/hc/en-us/articles/115000150272-How-do-I-use-Cache-Everything-with-Cloudflare-

2 Likes

What types of side effects my friend? please help.

Your site is an e-commerce website, and therefore many pages would not be suitable for caching, as they need to remain “dynamic”, that is, they need to be regenerated by the origin for every visit.

You’d need to figure out exactly what can be cached without interfering on your website functionality. Then you can create rules that prevent these files from being cached. Assuming for example that all the pages on your website that must remain dynamic are either on a folder /cart or /payment, then you could have 3 page rules:

/cart* >>> Cache Level: Bypass
/payment* >>> Cache Level: Bypass
/* >>> Cache Level: Cache Everything

This would avoid that one client’s information (purchases, navigation history etc) is made available to others, which could probably happen if you set “cache everytthing” for all pages on an e-commerce site.

This topic was automatically closed after 30 days. New replies are no longer allowed.