文件未从具有过期和缓存控制的浏览器缓存加载

时间:2012-10-04 10:32:18

标签: gwt apache2 browser-cache mod-expires mod-headers

我正在开发一个gwt项目,我使用apache2,mod_proxy,mod_expires和mod_headers设置代理来管理负载均衡和缓存。

所有资源,都很好地执行一个XXX.cache.html。使用Firefox / Firebug或chrome / developer Tools,我可以看到它是唯一不是“来自缓存”的文件。这是最大的文件

html文件(由gwt编译器生成)不包含带缓存参数的元文件。

我看不出有什么问题:

请求:

HeadersPreviewResponseCookiesTiming
Request URL:https://myproject.visionobjects.com//com.visionobjects.myscript.myProject/75797371ADDF8643260E34AC670CE051.cache.html
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:max-age=0
Connection:keep-alive
Cookie:__utma=215925392.462910615.1307714119.1324051842.1332755699.3; MYSCRIPTWSSESSONID=myproject-node1ali0jv5kfn371vbphmbhekcx9.myproject-node1; __utma=255591828.1472483096.1335971537.1348212480.1349343132.10; __utmb=255591828.15.10.1349343132; __utmc=255591828; __utmz=255591828.1335971537.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
Host:myproject.visionobjects.com
Pragma:no-cache
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1284.2 Safari/537.13

响应:

Accept-Ranges:bytes
Cache-Control:max-age=31536000, public
Connection:Keep-Alive
Content-Encoding:gzip
Content-Type:text/html
Date:Thu, 04 Oct 2012 10:12:43 GMT
Expires:Fri, 04 Oct 2013 10:12:43 GMT
Keep-Alive:timeout=15, max=98
Server:Jetty(7.6.5.v20120716)
Transfer-Encoding:chunked
Vary:Accept-Encoding

1 个答案:

答案 0 :(得分:0)

请求包含Cache-Control: max-age=0Pragma: no-cache,因此与您的服务器配置无关。