“正常重新加载”,“硬重新加载”和“空高速缓存和硬重新加载”之间的区别是什么?在铬? [英] What's the difference between "Normal Reload", "Hard Reload", and "Empty Cache and Hard Reload" in chrome?

查看:140
本文介绍了“正常重新加载”,“硬重新加载”和“空高速缓存和硬重新加载”之间的区别是什么?在铬?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在chrome中发现了这个新功能:


我可以计算出选项1和选项3之间的差异,而选项2可能介于两者之间,但我不能任何人都知道每个选项的确切行为?

解决方案

正常重新载入



与按 F5 相同。这将使用缓存,但在页面加载期间重新验证所有内容,查找304未修改响应。如果浏览器可以避免重新下载缓存的JavaScript文件,图像,文本文件等,那么它就会发生。




硬重新加载



发出请求时,不要在缓存中使用任何内容。强制浏览器重新下载每个JavaScript文件,图像,文本文件等。




清空缓存和硬重新载入



显然,如果缓存为空,那么它将不得不重新加载。这将再次强制浏览器重新下载所有内容。但是,如果页面通过JavaScript进行任何不是页面加载的一部分的事后下载,那么这些可能仍然使用缓存,缓存是清空缓存的帮助,因为它确保即使这些缓存不会使用缓存文件。






注意:此功能仅在开发人员工具处于打开状态时可用。

I recently discovered this new feature in chrome :

I can figure out the difference between option 1 and option 3, and that option 2 is probably something in between, but I can't find any more precise information anywhere.

Anybody know the precise behavior of each of the 3 options ?

解决方案

Normal reload

The same thing as pressing F5. This will use the cache but revalidate everything during page load, looking for "304 Not Modified" responses. If the browser can avoid re-downloading cached JavaScript files, images, text files, etc. then it will.


Hard reload

Don't use anything in the cache when making the request. Force the browser do re-download every JavaScript file, image, text file, etc.


Empty Cache and Hard Reload

Obviously if the cache is empty then it will have to do a hard reload. This will again force the browser to re-download everything. However, if the page makes any after-the-fact downloads via JavaScript that weren't part of page load, then these might still use the cache, which is where emptying the cache helps because it makes sure that even these won't use cached files.


Note: This feature is only available when the developer tools are open.

这篇关于“正常重新加载”,“硬重新加载”和“空高速缓存和硬重新加载”之间的区别是什么?在铬?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆