GTMetrix and Webpagetest always shows MISS for the first run, and then HIT for consecutive runs

Hello,

Please excuse my lack of knowledge of Cloudflare. I am very new to CDN technology.

My website is developed in WordPress and I am using a plugin called WP Cloudflare Super Page Cache. I have also enabled Cloudflare connectivity from my Hostinger hPanel.

When I am running GTMetrix and webpagetest benchmarking tools, they are showing cf-cache-status as MISS for the first run and then HIT for the repeated runs. After a few minutes, they again show as MISS. On consecutive runs, they show HIT. And this loop keeps happening after few minutes.

This is decreasing my webpage speed performance and I am getting poor results.

Can you please let me know how to fix this? Will increasing the cache time or running preloader help in improving the speed of my website?

Good day @neo4evr ,

Do you use HSTS on your web server and what’s you max-age?
Does your content not expire to quickly?

expire-content

Hello,
No, I do not have HSTS enabled.
My max-age is 604800. Here is a screenshot of what I see in my Google Chrome browser inspection tool:https://snipboard.io/jnK4S8.jpg

This is expected behaviour. On the first request the Cloudflare cache does not have a copy of your site, so it has to fetch from your origin. Subsequent requests can be served from cache until the asset is evicted from cache.

Your screenshot shows an Expires header. Do you also have a Cache-Control header?

Sure. Here is the Cache-Control header: https://snipboard.io/lwe1RB.jpg

Actually, the cache status is showing MISS for the first load on benchmarking websites after every few random minutes. I am selecting the same server location for benchmarking (Mumbai). Is my cache on Cloudflare expiring too soon?

I want the cached assets to stay and get fetched or HIT successfully from Cloudflare for at least 24 hours because it is a blog site and the static assets do not get modified frequently.

The cache-control header can specify a max-age, which is not a minimum or a guarantee. Cloudflare will evict content which is not being accessed, and free plans are more likely to have content evicted from cache. The best way to get your content cached for longer is to have more popular content!

(Also, you can copy-paste the header values into the forum, there is no need to link to external image hosting sites)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.