Cloudflare NOT respecting existing headers!

cache
#1

Hello,

I have a php file, and after hours of troubleshooting to figure out why after I turned over things to cloudflare my page (rendered from said php file) wasn’t responding correctly anymore, I positively was able to establish that even though I have headers explicitly set up to no-cache in the file, cloudflare still cached the resource! And I did not have any page rule set up to override what I explicitly requested in the headers.
I don’t need a reply that tells me “oh, maybe you didn’t do this, maybe you didn’t that, blah blah blah…” because I am positively telling you that cloudflare cached my php file whereas the header said not to cache it. I am very sure that something is wrong on the cloudflare side, and I want to know why cloudflare is so aggressive in caching even resources that have been marked to not be cached, please give me an answer to that, why??? Why???
Please don’t reply to my question with more questions, if you don’t know the answer then please don’t reply.
Cloudflare is caching resources it was asked to stay off of, and I want to know why this is the case and how to stop it, because it essentially means cloudflare is not doing what it claims in its documentation. I read all the caching docs on cloudflare I could find, and this behavior is not supposed to happen; this is very fishy.

Thanks

0 Likes

Cloudflare Caching
#2

Cloudflare is no even supposed to be caching php files unless a page rule is set! So, the fact that it is caching a php file, ignoring all rules is really a failure

0 Likes

#3

Please post an example URL where you encounter this issue. As it says right here in the knowledge base:

The second way to alter what Cloudflare will cache is through caching headers sent from the origin. Cloudflare will respect these settings…

Please also post a picture of your page rules.

5 Likes

#4

Hello,

I have read all the docs I could find on cloudflare caching, and I must say that it is likely impossible to follow their docs and get guaranteed results. This is why I’m here, to inquire from someone who through trial and error has been able to figure out the very convoluted and unclear directions (at least for what it seems to be now for me) on cloudflare caching.
I have purged all the cache, and when I check the site on [https://www.webpagetest.org] it still shows that cloudflare is pulling out old cached copies and serving them.
I even set page rules, and it seems as though I absolutely set nothing!
This is extremely frustrating, to say the least.
Could anyone provide me with example of a header file and a page rule set for that header and what the outcome was?
Thank you!

0 Likes

#6

Sorry to break the news to you, but page rules DO apply to header files because a rule set on a URL can modify headers on a file.

I appreciate your reply, but exercise more caution in replying next time or ask for clarification if you do not understand.

Thanks

0 Likes

closed #7
0 Likes