Apache强制Cache-Control:自动为HTTPS请求私有

我试图让浏览器通过HTTPScaching资产。 我正在使用MD5指纹识别方法,以允许长期caching,我有这部分工作正常。

什么不行的是在Apache中设置caching控制标题。

我的常规SSL vhost的configuration包含:

ExpiresActive On ExpiresByType text/css "now plus 1 year" 

HTTP请求到/test.css会产生标题:

 Cache-Control: max-age=31536000 Content-Type: text/css Date: Wed, 15 May 2013 10:33:01 GMT Etag: "7e572-19-4dcbdc8c04529" Expires: Thu, 15 May 2014 10:33:01 GMT Last-Modified: Wed, 15 May 2013 08:46:21 GMT Server: Apache/2.2.15 (Oracle) Vary: Accept-Encoding,User-Agent 

HTTPS请求到相同的文件产生标题:

 Cache-Control: private, must-revalidate, no-cache, no-store Content-Type: text/css Date: Wed, 15 May 2013 10:33:58 GMT Etag: "7e572-19-4dcbdc8c04529" Expires: Thu, 01 Jan 1970 00:00:00 GMT Last-Modified: Wed, 15 May 2013 08:46:21 GMT Server: Apache/2.2.15 (Oracle) Vary: Accept-Encoding,User-Agent 

顺便说一句,在ExpiresByType之后添加这个权限:

 Header unset Expires Header unset Cache-Control 

从HTTP中删除这些头,但从HTTPS请求中删除。

此外,我已经证实,我设置的任何其他头获取通过,但不是caching相关的标题,如caching控制过期 – 这些被覆盖的地方。

这是正常的Apache行为还是一些旨在提高安全性的Oracle或Red Hat修补程序?

这可以closures吗?

系统信息:

 OS: Oracle Linux 6.4 (RHEL 6.4 based) Apache: 2.2.15 (from rpm) 

使用Cache control: public directive 为Firefox启用HTTPScaching

某些版本的Firefox需要设置Cache control: public标题,以便通过SSL发送的资源可以caching在磁盘上,即使其他caching标头是明确设置的。 尽pipe此标头通常用于启用代理服务器的caching(如下所述),但代理无法caching通过HTTPS发送的任何内容,因此为HTTPS资源设置此标头始终安全

资料来源: https : //developers.google.com/speed/docs/best-practices/caching#LeverageBrowserCaching