Exclude urls from caching

Hello,
on my site I want to exclude backend login and rss data frrom caching. I have the following page rules
at the end:
https://mydolmain.com/el/rss-data.feed*
https://www.businessnews.gr/administrator*

When I hit the above urs and insepting my network traffic from firefox I see at the reposne header the entry
server:Cloudflare

I suppose that this means that the above urls doas not bybass cache.
So what should I do for not chaching these two urls?

Hi @c.korifidis,

The server: Cloudflare header will be there whether or not the content is cached, as long as the website is proxyied by Cloudflare (not paused).

You should be looking for the cf-cache-status header, which will be present only for cacheable assets, and have as value HIT if cached, and either MISS or EXPIRED if not.

1 Like

thanks,
but I dont see the header you are mentionig on either the cached or not cached page. Actually I think I sse same headers for both cached or uncached page.
What I see is:

Uncached Response Headers:
cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-ray: 4f9675d9b9ed9e97-ATH
content-encoding: br
content-security-policy: xxxx
content-type: text/html; charset=utf-8
date: Sat, 20 Jul 2019 16:55:01 GMT
expect-ct: max-age=604800, report-uri=“https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct
expires: Wed, 17 Aug 2005 00:00:00 GMT
last-modified: Sat, 20 Jul 2019 16:55:01 GMT
pragma: no-cache
referrer-policy: no-referrer-when-downgrade
server: Cloudflare
status: 200
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-frame-options: Allow-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-frame-options: ALLOW-FROM xxxx
x-xss-protection: 1;
mode=block

Cached Page Headers:

cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-ray: 4f96785f3db29e97-ATH
content-encoding: br
content-security-policy: xxxxxx
content-type: text/html; charset=utf-8
date: Sat, 20 Jul 2019 16:56:44 GMT
expect-ct: max-age=604800, report-uri=“https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct
expires: Wed, 17 Aug 2005 00:00:00 GMT
last-modified: Sat, 20 Jul 2019 16:56:44 GMT
pragma: no-cache
referrer-policy: no-referrer-when-downgrade
server: Cloudflare
status: 200
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-frame-options: Allow-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-frame-options: ALLOW-FROM xxxxxx
x-xss-protection: 1; mode=block

Neither of these are being currently cached by Cloudflare. Your origin server is sending headers cache-control: no-cache, and that tells Cloudflare not to cache them.

These are two articles that describe how Cloudflare handles cache, and how to properly set page rules to override you origin headers:

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.