First load not cached

Hi,

I’ve got a quick question: at work we’re running Cloudflare Pro. When try and test our site in one of more popular speed tests (Pagespeed Insights, GTMetrix, Pingdom, Webpagetest) the first time i try the TTFB is always a problem. The same happens when i enter our URL and visit the site. The response Headers give a cf-cache-status: MISS.

When i hard-refresh the site get cached and the cf-cache-status changes to HIT. So Cloudflare DOES work.

It looks like every single visitor needs to cache the site for themselves. Is this normal behaviour for Cloudflare?

Thanks in advance.

It is, though it is not visitor but datacentre specific.

Hi Sandro,

Thanks for your reply.

So that should basically mean i should run all tests twice to get an actual (cached) impression? I take these tools all use different datacentres in different locations.

Visitors that view the site from the same datacentre all get the cached version of the site (once it’s initially cached)?

One last question: pages get cached (cf-cache-status: HIT) upon first visit from a visitor?

What do you mean by pages?

By default Cloudflare does not cache HTML but only the files listed at https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-Cloudflare-cache-for-static-content-

You’d need a page rule to cache more.

Hi Sandro,

Apologies for the confusion, let me try and explain: with pages i mean the site getting the cf-cache-status: HIT in the response headers?

For example: i purge the CF cache, so nothing is cached. Does the first visitor that visits the page trigger the site getting cached?

Not the site, only the applicable resources and only for the datacentre he is routed through.

Ok that makes sense, thanks a lot! :+1:

I’m going to be checking the static resources link you provided!

Hi Sandro,

We have a page rule with a wildcard on our root domain (https://www.domain.com/*) with Cache Level: Cache Everything … does this cache HTML aswell?

It does.

Awesome, thanks for your help! :slightly_smiling_face:

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