Cloudflare APO caching HTML, but not other files (JS, CSS, fonts, etc.)

Hi everyone. I am having issues with Cloudflare APO on my site CF APO seems to be caching only HTML, but not the other files, such as JS, CSS, fonts, etc.

What could be causing this?

All of your cf-cache-status are on “BYPASS”. This probably is caused by your cache-control. It is set to private. Have a read here what it means: Cache-Control - HTTP | MDN #private

Your HTML is getting cached, because it does not have this cache control set to private.

Thank you for the reply. How can I remove it?

That is implemented on your server/application somewhere. I don’t know where :slight_smile:
But you can use a .htaccess or nginx.conf to unset it, or to overwrite it.

You could also use Cloudflare’s transform rules to edit that header. I would recommend solving the problem at its root. For doing so please speak to your web developer and ask him to modify this header to match your requirements.

Thank you

You are welcome! Once you have solved the problem feel free to keep us here up to date, so others who have the same problem know what exactly caused this.

I can’t help you there, since Wordpress does have thousands of plugins and each of them could cause it. So must be done by someone who has access to your installation.

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