Why use Cache-Control header in request?
本地缓存也是缓存代理的一部分。
请求时使用Cache-Control 表示缓存的使用策略。
请求头里的no-cache表示浏览器不想读缓存,并不是说没有缓存。一般在浏览器按ctrl+F5强制刷新时,请求头里就有这个no-cache,也就是跳过强缓存和协商缓存阶段,直接请求服务器。(如果直接按F5的话,请求头是max-age=0,只跳过强缓存,但进行协商缓存)
而响应头max-age=259200 ,不太清楚,没验证出来
http://bbs.csdn.net/topics/391022213
There may be any number of intermediate proxies between the client and server which do caching. The client can explicitly request explicit caching behaviour from any and all caching entities, things like:
max-age- "I don't want a response older than X"no-cache- "I want a fresh response"no-transform- "I don't want it unless it's the original"only-if-cached- "Don't bother the origin server if you don't have it already"
As with all requests, servers have a certain leeway in whether to honour the request or not. Just because a client insists on an uncached response doesn't mean it's necessarily going to get it.
https://stackoverflow.com/questions/42652931/why-use-cache-control-header-in-request
Cache-Control: no-cache is generally used in a request header (sent from web browser to server) to force validation of the resource in the intermediate proxies. If the client doesn't send this request to the server, intermediate proxies will return a copy of the content if it is fresh (has not expired according to Expire or max-age fields). Cache-Control directs these proxies to revalidate the copy even if it is fresh.
https://stackoverflow.com/questions/14541077/why-is-cache-control-attribute-sent-in-request-header-client-to-server
Why use Cache-Control header in request?的更多相关文章
- [转]ASP.NET Core: Static Files cache control using HTTP Headers
本文转自:https://www.ryadel.com/en/asp-net-core-static-files-cache-control-using-http-headers/ Every sea ...
- 网站 cache control 最佳实践
推荐阅读: 2020年软件开发趋势 高并发案例 - 库存超发问题 负载均衡的分类及算法 异地多活架构 Postman 的替代品来了 有时,当第二次访问网站时,看起来比较怪,样式不正常. 通常,是因为 ...
- axios token header response request http拦截器 axios实现登录、拦截、登出
axios token header response request http拦截器 axios实现登录.拦截.登出 一个项目学会前端实现登录拦截 https://github.com/superm ...
- Header的Request部分和Response部分
转载:https://zh.wikipedia.org/wiki/HTTP%E5%A4%B4%E5%AD%97%E6%AE%B5#%E8%AF%B7%E6%B1%82%E5%AD%97%E6%AE%B ...
- spring cloud Bug之was unable to refresh its cache! status = Cannot execute request on any known server
可能原因: 1.application.yml server: port: 10001spring: application: name: microservice-consumer-movieeur ...
- was unable to refresh its cache! status = Cannot execute request on any known server
出现这种错误是因为: Eureka服务注册中心也会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端注册行为. 在 yml中设置 eureka.client.register-with-eu ...
- 使用 IntraWeb (39) - THttpRequest、THttpReply
在其它服务器脚本语言中熟悉的 Request.Response(THttpRequest.THttpReply) 在 IntraWeb 中算是幕后英雄了, 用户基本不需要直接操作它们了. IW 默认 ...
- Squid调试和故障处理
http://blog.zhdata.com/tag/squid第16章 调试和故障处理 16.1 一些通用问题 在讨论通用debug前,我先提起一些经常发生的问题. 16.1.1 “Failed t ...
- lnmp架构实现动态php
目录 LNMP动态网站php 1.PHP-FastCGI概述 PHP-FPM安装配置 配置PHP与数据库连接 配置PHP新增扩展模块 配置PHP-FPM主要配置 配置PHP-FPM错误日志 1.编译安 ...
随机推荐
- 洛谷 P1469 找筷子
题目描述 经过一段时间的紧张筹备,电脑小组的“RP餐厅”终于开业了,这天,经理LXC接到了一个定餐大单,可把大家乐坏了!员工们齐心协力按要求准备好了套餐正准备派送时,突然碰到一个棘手的问题,筷子!CX ...
- springCloud学习-服务的注册与发现(Eureka)
1.小记 这段时间有空,把springcloud的知识整理一下,好记性不如烂笔头,也让自己对springcloud有个清晰的认识.此次的整理记录主要借鉴了这位大佬的博客 https://blog.cs ...
- 嵌入式linux和嵌入式android系统有什么区别和联系?
转自:http://bbs.eeworld.com.cn/thread-430437-1-1.html 这个问题很多人问,尤其是初入嵌入式的菜鸟.其实大家都认为android是java,已经不是lin ...
- hdu_1039_Easier Done Than Said_201311051511
Easier Done Than Said? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/O ...
- 学习KNN算法体会和总结
k-d树(k-dimensional树的简称),是一种切割k维数据空间的数据结构.主要应用于多维空间重要数据的搜索(如:范围搜索和近期邻搜索). 索引结构中相似性查询有两种主要的方式:一种是范围查询( ...
- HDU 4514
真是神奇,G++TLE,C++500MS... 判环有一个图论知识就是,m>=n时必有环.如果以m的范围建图,会MLE. 然后,利用拓扑排序再来判定是否有环,因为有些景点可能是孤立的.同时,在拓 ...
- Project Euler:Problem 33 Digit cancelling fractions
The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplif ...
- 【BZOJ 1370】 团伙
[题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=1370 [算法] 并查集 + 拆点 [代码] #include<bits/std ...
- 85.Ext.Window
转自:https://chenjumin.iteye.com/blog/668421 1.主要配置项: closable:是否允许关闭窗口,默认为true. closeActi ...
- PCB 无需解压,直接读取Zip压缩包指定文件 实现方法
最近有一项需求,将电测试点数后台批量写入到工程系统流程指示中,而电测试文件存在压缩包中,压缩包存在公共网络盘 示例图: 一.采用原始方法(4步完成): 第1步:.网络盘ZIP拷到本地, 第2步:解压Z ...