Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第 19题(2019-08-15):请求时浏览器缓存 from memory cache 和 from disk cache 的依据是什么,哪些数据什么时候存放在 Memory Cache 和 Disk Cache中? #14

Open
qappleh opened this issue Aug 15, 2019 · 1 comment

Comments

@qappleh
Copy link
Owner

qappleh commented Aug 15, 2019

No description provided.

@qappleh
Copy link
Owner Author

qappleh commented Aug 16, 2019

第二个问题可以参考我写的博文 命中强制缓存时,该从哪拿缓存小节。
总的来说:

如果开启了Service Worker首先会从Service Worker中拿
如果新开一个以前打开过的页面缓存会从Disk Cache中拿(前提是命中强缓存)
刷新当前页面时浏览器会根据当前运行环境内存来决定是从 Memory Cache 还是 从Disk Cache中拿(可以看到下图最后几个文件有时候是从 Memory Cache中拿有时候是从Disk Cache中拿)
这是我的实验过程
第一个问题可以参考以下文章链接:
1.深入理解浏览器的缓存机制
2.四种浏览器缓存的故事
3.【缓存】HTML5缓存的那些事

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant