My fonts are not being cached

I have a CSS file that’s loading fonts sitting in my public directory:

Everything loads fine. However, I just noticed that the fonts are taking too long to load.
I am getting a MISS on cf-cache-status as shown in the image below:

Any idea why am getting a miss?

I’d check which cache control header your server is sending.

It does seem as if it instructed Cloudflare not to cache.

I get a HIT on the css file after first load:

But if your site keeps updating that query string every second, you’ll never get a HIT.

So, all the CSS and fonts are sitting on the Drupal side, consumed by another team in angular…And now digging further, I just spotted the below inside the htaccess

I am assuming that this would be the culprit. However, how would I edit this .htaccess?

Yeah, that’s the exact header that was mentioned and you’ll need to adjust or remove it. As long as you send that header you are telling Cloudflare not to cache. The comment actually even refers to it.


Which parts of this configuration should I remove?

Please refer to the appropriate documentation for that - or the person who configured it.

Not sure if this is the correct way to mark, but am using this as the correct answer because the issue was with the htaccess file that disabled caching

The forum is for supporting Cloudflare settings. If someone comes here with the same issue, they’ll see that it’s actually an origin issue they need to resolve at that end.

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