首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不支持firefox无缓存吗?

不支持firefox无缓存吗?
EN

Stack Overflow用户
提问于 2013-03-05 03:29:38
回答 1查看 2.1K关注 0票数 2

如何强制Firefox不缓存响应?我们已经尝试过了:

代码语言:javascript
复制
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
response.setDateHeader("Expires", 0); // Proxies.

但在about:cache中,我们仍然可以看到:

代码语言:javascript
复制
Cache entry information
key:    http://myhost.my.domain.com:42133/ducc-servlet/timestamp
fetch count:    4
last fetched:    2013-03-04 09:21:40
last modified:    2013-03-04 09:12:53
expires:    1969-12-31 19:00:00
Data size:    24
file on disk:    none
Security:    This document does not have any security info associated with it.
Client:    HTTP
request-method:    GET
response-head:    HTTP/1.1 200 OK Content-Type: text/html;charset=UTF-8 Cache-Control: no-cache, no-store, must-revalidate 
Date: Sun, 03 Mar 2013 14:12:57 GMT 
Expires: Sun, 03 Mar 2013 14:12:57 GMT 
Content-Length: 24 
Server: Jetty(7.4.4.v20110707)

00000000:  32  30  31  33  2e  30  33  2e  30  34  20  30  39  3a  31  32  2013.03.04 09:12
00000010:  3a  35  36  20  4d  6f  6e  0a                                  :56 Mon.

谢谢。

卢。

EN

回答 1

Stack Overflow用户

发布于 2013-03-05 12:25:39

Firefox将始终(除非空间耗尽)将数据存储在其缓存中,这样它就可以通过从缓存中提取数据来执行诸如查看源代码、另存为等操作。当然,如果数据被设置为"no-cache“,它可能不会用于正常的页面加载。

如果数据是无存储的,它会根据请求将缓存条目放在内存中,而不是磁盘上。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15209514

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档