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

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - 番茄的梦想

Debian防火墙的ufw的使用 Linux—nvm教程 LNMP一键安装包安装的mysql远程连接不上的问题 linux service文件格式 linux if命令 微软sdk及运行时下载地址 解决python错误 UnicodeDecodeError: 'gb2312' codec can't decode byte 0x8b in position 1: illegal multibyt pip相关介绍 结构(位置)伪类选择器 如何清除mstsc记录 ubuntu开启远程桌面功能 使用Windows远程桌面工具来远程连接控制Ubuntu系统 正则表达式 以A开头B结尾 取中间的内容 nginx 不带www的域名跳转www域名 IIS配置导入导出 CSS中hover选择器的使用详解 html 锚点三种实现方法 重置自增长id 如何解决Visual Studio2012 与此版本的Windows不兼容
缓存头Cache-Control的含义和使用
番茄的梦想 · 2022-09-16 · via 博客园 - 番茄的梦想

Cache-Control的特性

申明:Cache-Control 只支持get请求
  • 可缓存性,包括:
    • public:在HTTP请求返回的过程中,在cache-control设置了public这个值,代表这个HTTP请求返回的内容中所经过的任何路径当中,包括一些中间的HTTP的代理服务器以及发出这个请求的客户端浏览器都可以对这个返回的内容进行缓存的操作。
    • private:表示发起请求的这个浏览器才能进行缓存的
    • no-cache:每次发送请求都要去服务器验证一下,如果服务器告诉可以使用缓存,才使用本地缓存
  • 到期:
    • max-age=<seconds>
    • s-maxage=<seconds> 代替max-age,只有在代理服务器中才会生效
    • max-stale=<seconds> 即使这个缓存已经过期了,只要在max-stale这个时间内,还可以使用过期的缓存。
  • 重新验证:
    • must-revalidate:在设置了max-age这个缓存当中,如果已经过期了,必须去原服务端去重新获取资源来验证是否真的过期
    • proxy-revalidate:与must-revalidate差不多,这个是用在缓存服务器中的
  • 其它:
    • no-store:本地和代理服务器都不可以进行缓存,永远要拿新的内容
    • no-transform:主要用在proxy-服务器中。告诉代理服务器不要改动返回的内容
      说明:这些设置的头,只是 一个规范,但是这个代理服务器可以完全不按照这个规范去做。

posted on 2022-09-16 12:55  番茄的梦想  阅读(342)  评论()    收藏  举报