【问题标题】:http Last-Modified dont' work as expecthttp Last-Modified 没有按预期工作
【发布时间】:2013-07-23 14:14:52
【问题描述】:

回复:

Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:keep-alive
Content-Type:image/jpeg
Date:Tue, 23 Jul 2013 13:56:05 GMT
Etag:"76a5140090233de1521969b60c7636c1"
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified:Mon ,22 Jul 2013 10:16:06 GMT
Pragma:no-cache
Server:nginx/1.2.8
Set-Cookie:lang=en; expires=Thu, 22-Aug-2013 13:56:05 GMT; path=/
Set-Cookie:money=121; expires=Thu, 22-Aug-2013 13:56:05 GMT; path=/
Set-Cookie:UID=6; expires=Thu, 22-Aug-2013 13:56:05 GMT; path=/
Transfer-Encoding:chunked
X-Powered-By:PHP/5.4.13

在响应之后,请求是:

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:zh-CN,zh;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Cookie:sid=8cif822kqg6qo4vags10pbm697; PHPSESSID=su382iqj9pdgbl32gqd1fqff03;                     
Host:localhost
Pragma:no-cache
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36
Response Headersview source

如您所见,请求未按预期发送 If-Modified-Since 标头。

我还有什么想念的吗?我的浏览​​器没有禁用缓存。

任何人都可以帮助我吗?非常感谢。

【问题讨论】:

    标签: http caching http-headers http-caching


    【解决方案1】:

    diff nginx 304 header后,我注意到了原因。

    原因是 start_session() 没有添加缓存头。删除 Prgama 和 Cache-Control 头后。一切都向右转。

    【讨论】:

      猜你喜欢
      • 2013-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-28
      • 2021-10-19
      • 2020-03-18
      • 2012-06-14
      相关资源
      最近更新 更多