浏览器清缓存硬性刷新_如何硬刷新您的Web浏览器(绕过缓存)

浏览器清缓存硬性刷新_如何硬刷新您的Web浏览器(绕过缓存)

浏览器清缓存硬性刷新

浏览器清缓存硬性刷新_如何硬刷新您的Web浏览器(绕过缓存)

Sometimes, a website does not behave as expected or seems stuck showing outdated information. To fix this, it’s easy to force your browser to completely reload its local copy of the page (cache) using a simple keyboard shortcut. Here’s how to do it.

有时,网站的行为可能不符合预期,或者似乎停留在显示过时的信息。 要解决此问题,很容易通过简单的键盘快捷键强制浏览器完全重新加载其页面的本地副本(缓存)。 这是操作方法。

什么是浏览器缓存? (What Is a Browser Cache?)

To speed up browsing, web browsers save copies of website data to your computer as a set of files called a cache. When you load a website, you are often viewing a local copy of elements from the site (such as images) pulled from your cache.

为了加快浏览速度,Web浏览器将网站数据的副本作为一组称为缓存的文件保存到您的计算机上。 加载网站时,通常会查看从缓存中提取的网站元素的本地副本(例如图像)。

Normally, if the browser loads a website and detects a change, it will fetch a new version of the site from the remote web server and replace the cache. But the process is not perfect, and sometimes your browser may end up with a local copy of the website data in your browser cache that doesn’t match the latest version on the server. As a result, a web page may look incorrect or not function properly.

通常,如果浏览器加载了网站并检测到更改,它将从远程Web服务器获取该网站的新版本并替换缓存。 但是此过程并不完美,有时您的浏览器可能最终会在浏览器缓存中获得网站数据的本地副本,而该副本与服务器上的最新版本不匹配。 因此,网页可能看起来不正确或无法正常运行。

To fix this, we need to force the web browser to discard what it already has in the cache and to download the latest version of the site. Many people call this a “hard refresh.”

要解决此问题,我们需要强制Web浏览器放弃其在缓存中已经拥有的内容,并下载该网站的最新版本。 许多人将此称为“硬刷新”。

如何在浏览器中执行硬刷新 (How to Perform a Hard Refresh in Your Browser)

In most browsers on PC and Mac, you can perform a simple action to force a hard refresh. Hold down the Shift key on your keyboard and click on the reload icon on your browser’s toolbar.

在PC和Mac上的大多数浏览器中,您可以执行简单的操作来强制进行硬刷新。 按住键盘上的Shift键,然后单击浏览器工具栏上的重新加载图标。

浏览器清缓存硬性刷新_如何硬刷新您的Web浏览器(绕过缓存)

There are also keyboard shortcuts to perform the equivalent hard refresh. Because there are multiple ways to do the same action, they will be listed below:

也有键盘快捷键可以执行等效的硬刷新。 由于有多种方法可以执行相同的操作,因此将在下面列出:

  • Chrome, Firefox, or Edge for Windows: Press Ctrl+F5 (If that doesn’t work, try Shift+F5 or Ctrl+Shift+R).

    适用于Windows的Chrome,Firefox或Edge:按Ctrl + F5(如果不起作用,请尝试按Shift + F5或Ctrl + Shift + R)。

  • Chrome or Firefox for Mac: Press Shift+Command+R.

    适用于Mac的Chrome或Firefox:按Shift + Command + R。

  • Safari for Mac: There is no simple keyboard shortcut to force a hard refresh. Instead, press Command+Option+E to empty the cache, then hold down Shift and click Reload in the toolbar.

    Mac版Safari:没有简单的键盘快捷键可以强制进行硬刷新。 而是按Command + Option + E清空缓存,然后按住Shift并单击工具栏中的“重新加载”。

  • Safari for iPhone and iPad: There is no shortcut to force a cache refresh. You’ll have to dig into settings to erase your browser’s cache.

    适用于iPhone和iPad的Safari:没有用于强制刷新缓存的快捷方式。 您必须深入研究设置才能清除浏览器的缓存。

After you perform the hard refresh, you should see the web page go blank, and the reloading process will take longer than usual. That’s because the browser is redownloading all of the data and images on the site.

执行硬刷新后,您应该会看到网页空白,并且重新加载过程将比平时花费更长的时间。 那是因为浏览器正在重新下载站点上的所有数据和图像。

If forcing a refresh didn’t fix the issue, you can try to do a hard refresh again. If that doesn’t help, the issue may be with the website itself—or your browser may need an update. Good luck!

如果强制刷新不能解决问题,则可以尝试再次进行硬刷新。 如果这样没有帮助,则问题可能出在网站本身上,或者您的浏览器可能需要更新 。 祝好运!

翻译自: https://www.howtogeek.com/672607/how-to-hard-refresh-your-web-browser-to-bypass-your-cache/

浏览器清缓存硬性刷新