How does caching work exactly? I just started reconfiguring apache's mod_expires settings, but I want to completely understand how this will effect the users. I've been trying to read the HTTP/1.1 docs, but they're making my head hurt.
From what I understand, if apache sets the max-age, then the browser will cache that file and not send another GET request until the cached copy becomes older that max-age. However, looking at requests in firebug, this doesn't appear to be the case. Do browsers (Firefox 3) decide what cache-able content to cache and what not to cache?
Also, I noticed that for static content, even without max-age defined (or set really short), it will send a "If-Modified-Since" request header, then the server will give a 304 reply if it hasn't been modified. That request header doesn't seem to be sent for dynamic content. The browser seems to know what html content is static somehow. Does it look for file extensions or something?
It has been suggested to me that the max-age should be greater than 30 days for images, css, js, etc. If changes to these files can take a month to propagate, 30 days seems excessive to me.