浏览器 HTTP Cache 缓存的存储位置、优先级、条件、机制、原理是什么 All In One
浏览器 HTTP Cache 缓存的存储位置、优先级、条件、机制、原理是什么 All In One
- memory cache
- disk cache
浏览器缓存
HTTP cache 存储位置、优先级、条件、 机制、原理是什么?
from memory cache
from disk cache
🕵️♂️这块内容,目前看来没有比较正确的答案呀
现在我是这么理解的 ✅
- 首先所有的资源第一次加载后,都是存在 memory cache 里面的;浏览器然后,根据 http cache 策略(强缓存/协商缓存),判断某个资源是否要 写入 disk cache;
- 后面,刷新页面再次请求资源的时候,浏览器按照(暂不考虑 service worker 等其他缓存)memory cache > disk cache 的顺序依次查找资源,直到命中,或重新请求;
The cache from which the request got matched can have an impact on the way this request is represented in DevTools and Resource Timing.
匹配请求的缓存可能会影响此请求在 DevTools 和 Resource Timing 中的表示方式。
https://calendar.perfplanet.com/2016/a-tale-of-four-caches/
强缓存 & 协商缓存
强缓存:
- expires
- Cache-Control
协商缓存:
ETag
/ If-None-MatchLast-Modified
/ If-Modified-Since
demos
https://cdn.xgqfrms.xyz/http-cache/index.html
refs
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12918954.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
2018-05-19 swiper & swiper slider
2018-05-19 Vue 2.x All In One
2017-05-19 React 2017
2016-05-19 video.js 使用手册& bugs
2016-05-19 CSS3 @font-face 使用教程: 各种 font-type (.eot .woff .ttf .svg)=== format('woff') ;format('embedded-opentype')/format("eot") ;format('truetype');format('svg');
2016-05-19 JW Player
2016-05-19 Difference between OGV and OGG All In One