View Full Version : [Resolved] Best Method? http header Cache-Control: max-age=3600, must-revalidate"
Major Tom MIB
04-16-2007, 05:36 AM
RE: header: Cache-Control: max-age=3600, must-revalidate
Is this the best/proper way to inform caching servers, proxies, and web browsers to 'check back in an hour' to make sure the content is 'fresh'?
The reference (http://www.mnot.net/cache_docs/#CONTROL) I saw to this header indicated that it was a 'fairly new' implementation and I just wanted to make sure I didn't have to deal with 'obsolete' browsers, etc.
Thanks.
Major Tom MIB
04-18-2007, 01:19 PM
It's not working with IE 7, so :( I've switched to "no-cache" for now until I can get one that works. I'll have to find one that works for me before I go into production mode or I could really kill my server (and my provide will kill me). Anyone know what will work with/for these .png files?
Now I have a new header, "X-Pad: avoid browser bug
", whats this about?
Thanks.
> curl --head "http://www.technutopia.net/boincstats/4a4e3b651f8451553bb70aa69b24633d.png"
HTTP/1.1 200 OK
Date: Wed, 18 Apr 2007 13:11:00 GMT
Server: Apache/1.3.33 (Unix)
Cache-Control: no-cache
X-Powered-By: PHP/5.2.1
Content-Type: image/png
> curl --head "http://www.technutopia.net/boincstats/4a4e3b651f8451553bb70aa69b24633d.png"
HTTP/1.1 200 OK
Date: Wed, 18 Apr 2007 13:11:05 GMT
Server: Apache/1.3.33 (Unix)
Cache-Control: no-cache
Last-Modified: Wed, 18 Apr 2007 13:11:01 GMT
ETag: "db95d5a-3d28-462618e5"
Accept-Ranges: bytes
Content-Length: 15656
Content-Type: image/png
X-Pad: avoid browser bug
Major Tom MIB
04-18-2007, 01:52 PM
I'll try "Cache-Control: max-age=3600", and drop the "must-revalidate" clause as it might have been a directive ONLY for proxy caches per Cache-Control HTTP Headers (http://www.mnot.net/cache_docs/#CACHE-CONTROL)
Major Tom MIB
04-29-2007, 09:35 PM
Okay, this is getting better. I copied the header information from the newly created graphic signature and sent it out with the image. So, now the headers from the php script are nearly identical to the server headers for the signature file. There seems to be a difference in order and php adds a 'X-powered' header, but this doesn't seem to affect the caching.
curl --head http://www.technutopia.net/boincstats/4cb5e27ca42862053dac0b7ac5e7545c.png
HTTP/1.1 200 OK
Date: Sun, 29 Apr 2007 21:16:14 GMT
Server: Apache/1.3.33 (Unix)
Accept-Ranges: bytes
Cache-Control: Cache-Control: max-age=3600
ETag: W/"db95a63-8480-46350b1e"
X-Powered-By: PHP/5.2.1
Last-Modified: Sun, 29 Apr 2007 21:16:14 GMT
Content-Length: 33920
Content-Type: image/png
curl --head http://www.technutopia.net/boincstats/4cb5e27ca42862053dac0b7ac5e7545c.png
HTTP/1.1 200 OK
Date: Sun, 29 Apr 2007 21:16:14 GMT
Server: Apache/1.3.33 (Unix)
Cache-Control: Cache-Control: max-age=3600
Last-Modified: Sun, 29 Apr 2007 21:16:14 GMT
ETag: W/"db95a63-8480-46350b1e"
Accept-Ranges: bytes
Content-Length: 33920
Content-Type: image/png
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.