I'm new to HTTP caching and really need some help...
I saw many people set the
"Cache-Control"
header when sending XHR to server. What is the purpose of doing that? Does request header needs caching too?I've set this header for a XHR:
Cache-Control max-age=30, must-revalidate
, but Firefox 3.6.13 seems do not re-validate the file when I refresh(even force refresh) after 30 seconds. No access-log in server either. Is this because I haven't set expire header to the file in Apache?From Firebug log:
Response Headers
Date Sat, 22 Jan 2011 09:59:21 GMT
Last-Modified Thu, 20 Jan 2011 09:05:11 GMT
Etag "3e000000023ca7-20d-49a436e5b3413"Request Headers
Keep-Alive 115
Connection keep-alive
Content-Type application/xml
Cache-Control max-age=30, must-revalidateThe file have been modified, but Firefox does not even do conditional get.
Response Date
andLast-Modified
not update at all.