惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - 三体星

5.12 纪念 同志们,我搬家了:oakley.yo2.cn 有点累 3/9[Update] 2/19 2/12 2.5 01/15 doubanclaim7506ce0560ac4303 01/04 00/00 11/21-真正的旅行 11/21 12/21 12/08 12/07 12/06 源氏物语 11/02
3/23[关于浏览器缓存] - 三体星 - 博客园
三体星 · 2009-03-23 · via 博客园 - 三体星

功能:根据Yslow原则,缓存合适使用,可以大大提高速度。
使用Http头:

Cache-Control 用于控制HTTP缓存
Expires 表示存在时间

设置格式如下:

<meta http-equiv="Cache-Control"
content="max-age=7200" />
<meta http-equiv="Expires" content="Mon, 20 Jul 2009
23:00:00 GMT" />

在servlet中设置:

response.setContentType("application/octet-stream");

response.setHeader("Cache-Control","max-age=300");
setDateHeader
setIntHeadr

现象1:在Firefox下,刷新的时候,对于非静态地址,都会重新加载,返回200,静态内容返回304,是检测是否更新的。而在地址栏中回车,以及后退的时候,对于缓存的内容不会重新加载。IE下未测试。

-----------------------------
http://www.w3.org/Protocols/
http://www.ietf.org/internet-drafts/draft-ietf-httpbis-p6-cache-06.txt