I want to make sure that if the file changes (if cache files are deleted for example), the user’s browser shouldn’t load the cached version.
Here is the issue I found. Here are the headers when I DON’T use caches_page:
HTTP/1.1 200 OK =>
ETag => "4ff902bc57e1892d7a963e43bf56dcc8"
X-UA-Compatible => IE=Edge,chrome=1
Cache-Control => max-age=0, private, must-revalidate
X-Runtime => 2.710376
X-Rack-Cache => miss
Set-Cookie => _Myapp_session=.....; path=/; HttpOnly
Status => 200
And here are the headers when I do use it:
HTTP/1.1 200 OK =>
ETag => "80003-1ad93-4b44a71a41180"
Last-Modified => Sat, 17 Dec 2011 14:22:14 GMT
Accept-Ranges => bytes
I’ve removed the common lines for easy comparison.
Are there any issues with these differing headers?
I didn’t find any rails way to do this so put in “Header set” directives in apache.conf