【发布时间】:2010-11-02 10:09:44
【问题描述】:
虽然我已将 Expires 设置为过去的日期,并将 Cache-Control 设置为 no-store, no-cache,但我的网页仍然会被缓存。
以下是发送到浏览器的 HTTP 标头:
Date: Tue, 02 Nov 2010 09:13:23 GMT
Server: Apache/2.2.15 (el)
X-Powered-By: PHP/5.2.13
Set-Cookie: PHPSESSID=2luvb7b316lfc8ht570s1l1v84; path=/
Set-Cookie: Newsletter_Counter=17; expires=Wed, 02-Nov-2011 09:13:23 GMT; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Connection: close
Content-Type: text/html; charset=UTF-8
FF 3.6、Safari 和 IE 8 的行为相同。
如何让浏览器停止缓存页面?
【问题讨论】:
-
所以,我猜你的问题是,我如何让这个页面不缓存?
-
X-Profane-Cache-Control: stop-caching-this-f-ing-page-you-unholy-bastard-of-a-browser可能不起作用,但可能会让你感觉更好?
标签: http http-caching