【问题标题】:Caching issues relating to HTTP headers, Chrome, WSGI与 HTTP 标头、Chrome、WSGI 相关的缓存问题
【发布时间】:2011-12-03 16:49:05
【问题描述】:

我正在尝试缓存一些静态文件。我正在使用以下 HTTP 标头:

Date            Sat, 08 Oct 2011 19:34:30 GMT
Content-Length  770
Last-Modified   Wed, 05 Oct 2011 05:45:29 GMT
Server          WSGIServer/0.1 Python/2.7.1+
Content-Type    text/css
Cache-Control   public, max-age=3153600
Expires         Sun, 07 Oct 2012 19:34:30 GMT

但是,当我在调试到 WSGI 服务器时通过 Chrome 访问该文件时,服务器仍在处理该文件。

我可能做错了什么?

【问题讨论】:

    标签: python caching google-chrome webserver wsgi


    【解决方案1】:

    这看起来与我刚刚问过的问题 here 非常相似。我似乎在 Last-Modified 和 max-age 标头之间进行了交互。如果指定了 Last-Modified 标头,则忽略 max-age。

    【讨论】:

      猜你喜欢
      • 2011-09-01
      • 2012-02-20
      • 2011-11-24
      • 1970-01-01
      • 2012-08-26
      • 2015-05-25
      • 1970-01-01
      • 2015-12-12
      • 2021-03-19
      相关资源
      最近更新 更多