I am using a wordpress theme, which comes along with a Mobile Theme also. I have set caching using WP Super Cache and I have set all caching settings according to the theme guide. By the way, I am using Cloudflare and I have also set Cloudflare settings according to the theme guide.
I also set Browser cache TTL to 1 month in cloudflare
Apart from that I have added the following 3 page rules in Cloudflare
Security Level: High, Cache Level: Bypass, Disable Apps, Disable Performance
Security Level: I’m Under Attack, Cache Level: Bypass, Disable Apps, Disable Performance
Cache Level: Cache Everything, Origin Cache Control: On
I have also set cache control header in .htaccess . Below is the code
BEGIN CachingHeader set Cache-Control “max-age=2592000, public” Header set Cache-Control “max-age=604800, public” Header set Cache-Control “max-age=216000, private” Header set Cache-Control “max-age=216000, public, must-revalidate” Header set Cache-Control “max-age=1, private, must-revalidate” # END Caching
My response header for jpeg file are as below:
cache-control: max-age=2592000, public
cache-control: no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0
date: Mon, 23 Dec 2019 07:15:46 GMT
expect-ct: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
last-modified: Sun, 22 Dec 2019 07:58:16 GMT
I have checked with my host and they have replied saying –
We checked the website and it’s currently using CloudFlare service for DNS and caching.
Also, the header reply for client’s site is also returned by CloudFlare server. What we can advise for this case is to correctly configure WordPress website for using CloudFlare for the headers to be correct.
I have checked with my theme developer, they have replied by saying
Please note that this has to be addressed directly to Cloudflare service.
Somehow Cloudflare’s CDN is not caching images and other files(cf-cache-status: BYPASS). Am I missing something here?