当前位置:网站首页>浏览器缓存
浏览器缓存
2022-06-27 01:08:00 【大鸡腿最好吃】

浏览器每次发起请求,都会先在浏览器缓存中查找该请求的结果以及缓存标识
浏览器每次拿到返回的请求结果都会将该结果和缓存标识存入浏览器缓存中
一开始会先走强缓存
强制缓存就是向浏览器缓存查找该请求结果
1,不存在该缓存结果和缓存标识,强制缓存失效,则直接向服务器发起请求(返回200)
2,存在该缓存结果和缓存标识,但该结果已失效,强制缓存失效,则使用协商缓存,
浏览器携带缓存标识,发起请求,如果资源更新了,则返回新的结果,状态码为200,如果资源没更新,则返回304,可继续使用缓存文件
3,存在该缓存结果和缓存标识,且该结果尚未失效,强制缓存生效,直接返回该结果
强制缓存优先于协商缓存进行,若强制缓存(Expires和Cache-Control)生效则直接使用缓存,若不生效则进行协商缓存(Last-Modified / If-Modified-Since和Etag / If-None-Match),协商缓存由服务器决定是否使用缓存,若协商缓存失效,那么代表该请求的缓存失效,重新获取请求结果,再存入浏览器缓存中;生效则返回304,继续使用缓存,主要过程如下:
边栏推荐
- How to convert an old keyboard into a USB keyboard and program it yourself?
- 微博评论高性能高可用架构
- Is it safe to open a securities account online? Is it reliable to speculate in stocks by mobile phone
- 对象的访问机制及其他
- Daily question brushing record (V)
- Operating instructions and Q & A of cec-i China learning machine
- Statistical Hypothesis Testing
- memcached基础3
- XSS attack notes (Part 1)
- Database interview questions +sql statement analysis
猜你喜欢

Hid device descriptor and keyboard key value corresponding coding table in USB protocol

How to use ch423? Cheap domestic IO expansion chip

Analysis of ideal L9 product power: the price is 459800 yuan, the four cylinder engine is adopted, and the endurance is 1315km

SystemVerilog仿真速率提升

Esp32-solo development tutorial to solve config_ FREERTOS_ UNICORE problem

乔治·华盛顿大学 : Hanhan Zhou | PAC:多智能体强化学习中具有反事实预测的辅助价值因子分解

超越锂电池——未来电池的概念
![Count the logarithm of points that cannot reach each other in an undirected graph [classic adjacency table building +dfs Statistics - > query set optimization] [query set manual / write details]](/img/cc/a0be58eddc72c22a9a6ee5c61eb81a.png)
Count the logarithm of points that cannot reach each other in an undirected graph [classic adjacency table building +dfs Statistics - > query set optimization] [query set manual / write details]

Operating instructions and Q & A of cec-i China learning machine

Law of Large Numbers
随机推荐
Flink 实战问题(七):No Watermark(Watermarks are only available EventTime is used)
XSS attack notes (Part 1)
世界很大,有人把二维码纹在脖子上
Meituan: data management and pit avoidance strategy summarized after stepping on Thunder for several years
CH423要如何使用,便宜的国产IO扩展芯片
How to convert an old keyboard into a USB keyboard and program it yourself?
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘
可视化介绍 Matplotlib 和 Plotnine
The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry
Timing mechanism of LwIP
Bs-gx-016 implementation of textbook management system based on SSM
UVM中uvm_config_db非直线的设置与获取
Tsinghua & Zhiyuan | cogview2: faster and better text image generation model
memcached基础6
LeetCode 142. 环形链表 II
JSON解析,ESP32轻松获取时间气温和天气
Modeling specifications: environment settings
buuctf-pwn write-ups (6)
解决unable to create a folder to save the sketch: mkdir sketch
疫情期间居家办公的总结体会 |社区征文