304 Status

I have just been able to get a site pointing to Cloudflare and was wondering if you see any issues with the Response Headers I am pulling from Chrome Developer Tools.
Mainly the Status 304 and the cf-cache-status:REVALIDATED

Request Method:GET
Status Code:200 (from memory cache)

Referrer Policy:no-referrer-when-downgrade
Response Headers
cache-control:public, max-age=14400
date:Sun, 26 Nov 2017 11:02:23 GMT
expires:Sun, 26 Nov 2017 15:02:23 GMT
last-modified:Mon, 16 Mar 2015 22:43:38 GMT

If nobody else replies, this all looks ok to me.

A 304 looks to agree with the REVALIDATED status. Cloudflare’s internal cache expired, so it checked your server and found the file hadn’t changed.

Thanks for the reply…
What causes their internal Cache to Expire?

How can I tell if the images/css ect… is actually being cached on Cloudflare’s end?

Can you explain or do you have any documentation as to when I would see a 200 instead of 304 and a HIT instead of Revalidated?

There are two caches we’re talking about:

  1. Cloudflare Edge Cache: Your static files held on Cloudflare’s edge servers for a certain amount of time.

  2. Browser Cache: The content your visitors’ browsers naturally hold onto according to your cache headers.

I’m no cache expert, but I believe this is how it’s working: Since Cloudflare acts like a browser visiting your site, Cloudlfare edge-caches images, css, etc. for a couple of hours. But it knows you have your browser cache header set for a day or whatever. So after Cloudflare’s edge cache expires, but its browser cache hasn’t expired, it needs to refresh the edge cache by seeing if your file has changed on your server. No change means it gets a 304 and the Edge Cache is REVALIDATED for another couple of hours or so.

It’s possible the browser cache setting has nothing to do with this, but the edge cache checks back after it expires to see if the file has changed since the last edge cache fetch.