当前位置:网站首页>浏览器缓存
浏览器缓存
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,继续使用缓存,主要过程如下:
边栏推荐
- Review the old and know the new -- constant renewal at normal temperature
- Amazon elasticache quickly builds a cache service cluster, which is fast
- buuctf-pwn write-ups (6)
- NLP:Transformer在NLP自然语言领域的简介(预训练技术)、NLP模型发展(ELmo/GPT/BERT/MT-DNN/XLNet/RoBERTa/ALBERT)、经典案例之详细攻略
- Daily question brushing record (V)
- Structure the fifth operation of the actual camp module
- 自定义类加载器对类加密解密
- 持续交付-Blue Ocean 应用
- Solve the problem that stc8g1k08 program cannot run and port configuration
- USB协议中HID设备描述符以及键盘按键值对应编码表
猜你喜欢

buuctf-pwn write-ups (6)

理想L9产品力分析:售价45.98万,采用四缸发动机,续航1315公里

What are the skills and methods for slip ring installation

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

微博评论高性能高可用架构

Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk

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

Esp32-solo development tutorial to solve config_ FREERTOS_ UNICORE problem

清华&智源 | CogView2:更快更好的文本图像生成模型

解决STC8G1K08程序不能运行的问题和端口配置
随机推荐
Generate flow chart with code, and how to use markdown
Bs-gx-016 implementation of textbook management system based on SSM
Esp32 experiment - self built web server distribution network 02
Flutter series: flow in flutter
XSS notes (Part 2)
解决unable to create a folder to save the sketch: mkdir sketch
SystemVerilog仿真速率提升
Kept to implement redis autofailover (redisha) 16
Buuctf PWN write UPS (6)
JSON解析,ESP32轻松获取时间气温和天气
USB协议中HID设备描述符以及键盘按键值对应编码表
How to measure the thickness of glass substrate by spectral confocal
Memcached foundation 5
用代码生成流程图,Markdown的使用方法
Database interview questions +sql statement analysis
buuctf-pwn write-ups (6)
get_sequencer的用法总结
Kept to implement redis autofailover (redisha) 17
Memcached foundation 7
Keepalived 实现 Redis AutoFailover (RedisHA)13