Need advice adding Cache-control code to my website



I’m trying to add Cache-control code to my website pages. I really only have 3 types of pages, which are:

1.) Pages I want everything cached on, meaning every user sees the same page.

2.) Pages I want nothing cached on. (Like pages from the staff interface used to edit the website, or session URLs.)

3.) Pages I only want images cached on, but nothing else.

My first question is; Can I just add Cache-control as a META tag? That would be the easiest. If so, can someone advise me on 3 ways to write code per my 3 needs above? For example, is this suited for #2 above?

Then I see examples everywhere on CloudFlare’s support pages like this. But again, I wouldn’t know how to put that in a META tag. Help!
cache-control: private, max-age=0, no-cache

Thank you,
Dan W.


Cache control must be set in the headers, Cloudflare will not parse the Meta tag.


Note that as default we essentially only cache static files (so 3 should be fine with default settings).

For 1 & 2 if you can specify those two categories of pages using a URL pattern, then page rules would be the way to do it:

For 1 you would set Cache Level: Cache Everything
For 2 you would set Cache Level: Bypass Cache