Static images not being cached


#1

I’ve had my site routed through Cloudflare for almost a week now, but none of the static JPG and PNG pictures are being cached.

For instance, the image located at https://www.cornellrooseveltinstitute.org/img/generic_bg.jpg gives the following response headers:

Accept-Ranges →bytes
CF-Cache-Status →MISS
CF-RAY →45a4ee0868fb5a38-BOS
Cache-Control →public, max-age=14400
Connection →keep-alive
Content-Length →501645
Content-Type →image/jpeg
Date →Fri, 14 Sep 2018 18:31:19 GMT
ETag →W/"7a78d-165a0ed7428"
Expect-CT →max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Expires →Fri, 14 Sep 2018 22:31:19 GMT
Last-Modified →Mon, 03 Sep 2018 19:34:01 GMT
Server →cloudflare
Vary →Accept-Encoding
X-Powered-By →Express

As seen above, I’m getting CF-Cache-Status →MISS despite having Cache settings set to standard and no page rules except one that redirects everything to HTTPS.

All my DNS records are routed through CloudFlare (yellow cloud and everything). What could I be doing wrong?


#2

That is actually interesting, usually it’s an issue of cache-control headers, but these seem fine.

Are you sure that you don’t have any page rule or setting to bypass the cache?


#3

Your origin is telling Cloudflare not to cache the object. This is a snippet of the headers when communicating directly with the origin:

< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Fri, 14 Sep 2018 20:05:30 GMT
Date: Fri, 14 Sep 2018 20:05:30 GMT
< Server: Apache
Server: Apache
< X-Powered-By: Express
X-Powered-By: Express
< Accept-Ranges: bytes
Accept-Ranges: bytes
< Cache-Control: public, max-age=0
Cache-Control: public, max-age=0


#4

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