我有mod_cache和ETags的问题。这是我的情景:
环境:Firefox,Apache 2.2.22(默认为Mac OSX),任何Web App,Apache都是Web App的代理
初始状态:
情景:
Apache不应该将304返回浏览器吗?
其他信息:
更简单的方案:
apache conf
CacheRoot /private/var/log/apache2/cache/
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
CacheIgnoreCacheControl On
CacheIgnoreHeaders Set-Cookie
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / ajp://localhost:8009/ retry=0
ProxyPassReverse / ajp://localhost:8009/
ProxyPreserveHost on
请求/响应标题:
GET / HTTP/1.1
Accept: */*
If-None-Match: 123456
HTTP/1.1 200 OK
Date: Tue, 01 Oct 2013 14:01:16 GMT
ETag: 123456
Expires: Tue, 01 Oct 2013 14:30:55 GMT
Cache-Control: max-age=1800
Content-Language: en-US
Age: 21
Content-Length: 20186
Content-Type: text/html;charset=UTF-8