1
votes

The following is a http response header from a image on our company's website.

HTTP/1.1 200 OK
Content-Type: image/png
Last-Modified: Thu, 03 Dec 2009 15:51:57 GMT
Accept-Ranges: bytes
ETag: "1e61e38a3074ca1:0"
Date: Wed, 06 Jan 2010 22:06:23 GMT
Content-Length: 9140

Is there anyway to know if this image is publicly cacheable in some proxy server? The RFC definition seems to be ambiguous http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1 and http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4.

3

3 Answers

2
votes

Run RED on your URL and it'll tell you whether the response is cacheable, among other information.

0
votes

The headers you show appear to be cacheable.

If you would like to control the caching behavior of correctly configured proxies and web browsers, you might investigate using the Cache-Control and Expires headers to gain additional control.

Here is a webpage I had bookmarked that has one person's opinion of how to intepret the specifications you list (plus some other ones): http://www.web-caching.com/mnot_tutorial/how.html

If you need to guarantee that someone sees a completely new image each time (even with misconfigured devices between you and them), you may want to consider using a randomized or GUID value as part of the URL.

0
votes

Here is a tutorial on setting headers for proxy caching. Be sure to read the part about setting cookies!