我在缓存我的应用程序时遇到问题.
当此代码添加到tomcat的web.xml时:
<security-constraint>
<web-resource-collection>
<web-resource-name>HTTPSOnly</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Run Code Online (Sandbox Code Playgroud)
我收到了这个回复:
Cache-Control private
Date Tue, 18 Feb 2014 01:18:17 GMT
Etag W/"200-1391558564593"
Expires Thu, 01 Jan 1970 00:00:00 WET
Server Apache-Coyote/1.1
Run Code Online (Sandbox Code Playgroud)
没有这个代码一切都很好:
Accept-Ranges bytes
Cache-Control max-age=604800
Content-Length 1496
Content-Type text/css
Date Tue, 18 Feb 2014 01:21:26 GMT
Etag W/"1496-1391558561359"
Expires Tue, 25 Feb 2014 01:21:27 GMT
Last-Modified Wed, 05 Feb 2014 00:02:41 GMT
Server Apache-Coyote/1.1
Run Code Online (Sandbox Code Playgroud)
谁能说出问题的原因?以及为什么这段代码将cache-controle更改为我的应用程序的私有.非常感谢
Tomcat 7.0
JDK : 1.6
Run Code Online (Sandbox Code Playgroud)