“Normal Reload"、“Hard Reload"和“Empty Cache and Hard Reload"有什么区别?在 Chrome 中? [英] What's the difference between "Normal Reload", "Hard Reload", and "Empty Cache and Hard Reload" in Chrome?

查看:21
本文介绍了“Normal Reload"、“Hard Reload"和“Empty Cache and Hard Reload"有什么区别?在 Chrome 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I recently discovered this new feature in Chrome:

我能弄清楚选项 1 和选项 3 之间的区别,而选项 2 可能介于两者之间,但我在任何地方都找不到更准确的信息.

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.

有人知道这 3 个选项中每一个的确切行为吗?

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

推荐答案

正常重新加载

与按 F5 相同.这将使用缓存但在页面加载期间重新验证所有内容,查找304 Not Modified"回应.如果浏览器可以避免重新下载缓存的 JavaScript 文件、图像、文本文件等,那么它会.

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.

发出请求时不要使用缓存中的任何内容.(等于 SHIFT+F5 无需打开开发者控制台)强制浏览器重新下载每个 JavaScript 文件、图像、文本文件等.

Don't use anything in the cache when making the request. (which is equal to SHIFT+F5 No need to open Developer console) Force the browser do re-download every JavaScript file, image, text file, etc.

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

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.

这篇关于“Normal Reload"、“Hard Reload"和“Empty Cache and Hard Reload"有什么区别?在 Chrome 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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