当前位置:网站首页>浏览器缓存
浏览器缓存
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,继续使用缓存,主要过程如下:
边栏推荐
- UVM中uvm_config_db在sequence中的使用
- 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]
- Online text digit recognition list summation tool
- Break through the performance bottleneck of image recognition through rust language computing acceleration technology
- 解决u8glib只显示一行文字或者不显示的问题
- 架构实战营模块五作业
- ESP32-SOLO开发教程,解决CONFIG_FREERTOS_UNICORE问题
- About Random Numbers
- 疫情期间居家办公的总结体会 |社区征文
- Memcached Foundation
猜你喜欢

持续交付-Blue Ocean 应用

Gaussian and Summary Stats

Beyond lithium battery -- the concept of battery in the future

接口测试框架实战(一) | Requests 与接口请求构造

Basic introduction to C program structure Preview

疫情期间居家办公的总结体会 |社区征文

getReader() has already been called for this request

使用NetworkX对社交网络进行系统的分析:Facebook网络分析案例

Solve the problem that stc8g1k08 program cannot run and port configuration

C#程序结构预览最基础入门
随机推荐
memcached基础7
Daily question brushing record (V)
C#程序结构预览最基础入门
getReader() has already been called for this request
Statistical Hypothesis Testing
Interface test framework practice (I) | requests and interface request construction
Tsinghua & Zhiyuan | cogview2: faster and better text image generation model
About Random Numbers
NLP:Transformer在NLP自然语言领域的简介(预训练技术)、NLP模型发展(ELmo/GPT/BERT/MT-DNN/XLNet/RoBERTa/ALBERT)、经典案例之详细攻略
Keepalived 实现 Redis AutoFailover (RedisHA)17
解决u8glib只显示一行文字或者不显示的问题
USB协议中HID设备描述符以及键盘按键值对应编码表
Object access mechanism and others
ArcGIS 镶嵌数据集切片丢失问题处理
Buuctf PWN write UPS (6)
Memcached foundation 4
XSS attack notes (Part 1)
memcached基础
接口隔离原则
UVM中config_db机制的使用方法