什么是浏览器缓存?如何在所有主要浏览器中清除浏览器缓存?
When fixing common WordPress errors, one common piece of advice that you would often receive is to “clear your browser cache”.
(资料图片仅供参考)
修复常见的WordPress错误时 ,您经常会收到的一条常见建议是“清除浏览器缓存”。
Since you don’t need to clear browser cache for day to day internet use, most non-techy users are not familiar with the process.
由于您不需要为日常使用的互联网清除浏览器缓存,因此大多数非技术人员都不熟悉该过程。
In this beginner’s guide, we will show you how to quickly clear your browser cache in all major browsers, step by step. We will also explain what is browser cache and how browser caching works.
在此初学者指南中,我们将逐步向您展示如何在所有主要浏览器中快速清除浏览器缓存。 我们还将解释什么是浏览器缓存以及浏览器缓存的工作方式。
什么是浏览器缓存? (What is Browser Cache?)
Browser cache is a technology used by most popular web browsers to save visited website’s data on a user’s computer. This allows the browser to quickly display a webpage on your next visit.
浏览器缓存是最流行的Web浏览器使用的一种技术,用于将访问过的网站的数据保存在用户的计算机上。 这使浏览器可以在您下次访问时快速显示网页。
The logic behind it is that downloading static files from a WordPress hosting server located far away will take more time than reusing the resources from the user’s computer. This reduces the overall page load time and makes your online experience faster.
其背后的逻辑是,与重用用户计算机中的资源相比,从远处的WordPress托管服务器下载静态文件将花费更多时间。 这样可以减少整体页面加载时间,并使您的在线体验更快。
Typically browsers will not cache complete web pages unless the web developers specifically tell them to do it (via code). Instead browsers focus on static content like stylesheets, images, and JavaScript.
通常,浏览器不会缓存完整的网页,除非Web开发人员明确指示他们(通过代码)这样做。 相反,浏览器专注于样式表,图像和JavaScript等静态内容。
Why browsers cache static content?
为什么浏览器缓存静态内容?
Browser cache static content because it does not change as often as dynamic content.
浏览器缓存静态内容,因为它不会像动态内容那样频繁地更改。
For example, if you visit a WordPress website then the content of your posts and pages is more likely to change than your WordPress theme.
例如,如果您访问WordPress网站,则与WordPress主题相比,帖子和页面的内容更有可能发生变化。
A typical website template includes several stylesheets, JavaScript files, and images. These files remain the same on each page, so downloading a fresh copy on every page load is simply inefficient.
一个典型的网站模板包括几个样式表,JavaScript文件和图像。 这些文件在每个页面上都保持不变,因此在每次加载页面时下载新副本的效率很低。
This is why browsers keep a copy of these static files in a temporary storage folder on your computer, so they use that copy on your next website visit.
这就是为什么浏览器将这些静态文件的副本保留在您计算机上的临时存储文件夹中,以便它们在您下次访问网站时使用该副本。
If you are using a WordPress caching plugin, then it may add guidelines for browsers to cache your static content along with expiration instructions for each resource type.
如果您使用的是WordPress缓存插件 ,则它可能会为浏览器添加一些准则,以供浏览器缓存您的静态内容以及每种资源类型的过期说明。
This improves user experience and makes the internet faster for everyone.
这样可以改善用户体验,并使所有人的互联网速度更快。
Why and when you need to clear browser cache?
为什么以及何时需要清除浏览器缓存?
Most popular browsers are smart about deciding which content to store in cache.
大多数流行的浏览器都很聪明地决定要存储在缓存中的内容。
However, sometimes they are unable to figure out that the website you are viewing has changed. In that case, browsers will still load the cached version of files from local storage.
但是,有时他们无法确定您正在查看的网站已更改。 在这种情况下,浏览器仍将从本地存储加载文件的缓存版本。
This leads you to see an outdated version of a web page, and the website may not work as intended. If you have made some changes to your website, then you may not see them appear on the live site.
这会导致您看到网页的过时版本,并且该网站可能无法正常工作。 如果您对网站进行了某些更改,则可能看不到它们出现在实时网站上。
This is when you need to force reload that page in other words clear your browser cache.
在这种情况下,您需要强制重新加载该页面,换句话说,清除浏览器缓存。
Force browser to refresh / reload a page (Shortcut)强制浏览器刷新/重新加载页面(快捷方式) Clearing browser cache in Google Chrome在Google Chrome中清除浏览器缓存 Clearing browser cache in Firefox在Firefox中清除浏览器缓存 Clearing browser cache in Internet Explorer在Internet Explorer中清除浏览器缓存 Clearing browser cache in Edge在Edge中清除浏览器缓存 Clearing browser cache in Safari在Safari中清除浏览器缓存 Clearing browser cache in Opera在Opera中清除浏览器缓存 What to do when clearing browser cache doesn’t fix the problem?清除浏览器缓存无法解决问题时该怎么办?
强制浏览器硬刷新/重新加载页面 (Forcing Browsers to Hard Refresh / Reload a Page)
Before you clear your browser cache, you may want to try this step because it’s much faster and easier (this is what the Pros do).
在清除浏览器缓存之前,您可能需要尝试此步骤,因为它更快,更轻松(这是专业人士所做的)。
Basically, when you click on the refresh button in your browser, it will load static content from browser cache. However by using a keyboard shortcut, you can force the browser to bypass cache and download a fresh version of the web page.
基本上,当您单击浏览器中的刷新按钮时,它将从浏览器缓存中加载静态内容。 但是,通过使用键盘快捷键,您可以强制浏览器绕过缓存并下载网页的新版本。
Simply press the following keys to force a hard refresh in your web browser.
只需按以下键,即可在Web浏览器中强制硬刷新。
Google Chrome on Mac: Command + Shift + RMac上的Google Chrome:Command + Shift + R Google Chrome on Windows & Linux: CTRL + F5Windows和Linux上的Google Chrome浏览器:CTRL + F5 Firefox on Mac: Command + Shift + RMac上的Firefox:Command + Shift + R Firefox on Windows & Linux: CTRL + F5Windows和Linux上的Firefox:CTRL + F5 Safari: Command + Option + RSafari:Command + Option + R Opera on Mac: Command + Alt + RMac上的Opera:Command + Alt + R Opera on Windows: Shift + F5Windows上的Opera:Shift + F5
Normally forcing a hard refresh will solve your problem. However if it dose not, then you need to clear your browser cache to make sure that you are seeing the live version of a web page.
通常,强制硬刷新将解决您的问题。 但是,如果不这样做,那么您需要清除浏览器缓存以确保您看到的是实时网页。
在Google Chrome中清除浏览器缓存 (Clearing Browser Cache in Google Chrome)
Google Chrome is the most popular browser in the world right now. Here is how to clean the browser cache in Google Chrome.
Google Chrome浏览器是目前世界上最受欢迎的浏览器。 以下是在Google Chrome浏览器中清除浏览器缓存的方法。
Simply launch the Google Chrome web browser on your computer and then click on the three-dot menu in the top right corner. From the menu, you need to go to More Tools » Clear Browsing Data.
只需在计算机上启动Google Chrome浏览器,然后单击右上角的三点菜单即可。 从菜单中,您需要转到更多工具»清除浏览数据。
This will launch the Chrome Settings page with ‘Clear Browsing Data’ popup displayed on the screen. You need to switch to the Basic settings and then select ‘All time’ next to time-range option.
这将启动Chrome设置页面,并在屏幕上显示“清除浏览数据”弹出窗口。 您需要切换到基本设置,然后在时间范围选项旁边选择“所有时间”。
Below that, you need to check the box next to the ‘Cached images and files’ option.
在此之下,您需要选中“缓存的图像和文件”选项旁边的框。
You can also select ‘Clear cookies and other site data’ option. It will delete all cookies stored in your browser storage. Doing so will also log you out from all websites and end other sessions.
您还可以选择“清除Cookie和其他站点数据”选项。 它将删除浏览器存储中存储的所有cookie。 这样做还将使您退出所有网站并结束其他会话。
Next, click on the ‘Clear data’ button and Google Chrome will clear the browser cache.
接下来,点击“清除数据”按钮,然后Google Chrome浏览器将清除浏览器缓存。
在Firefox中清除浏览器缓存 (Clearing Browser cache in Firefox)
If you are using Mozilla Firefox, then this is how you can clear your browser cache.
如果您使用的是Mozilla Firefox,那么这就是清除浏览器缓存的方法。
First, you need to launch the Firefox web browser on your computer. After that, you need to click on the hamburger menu on the top-right corner of the screen and select the ‘Preferences’ option.
首先,您需要在计算机上启动Firefox Web浏览器。 之后,您需要点击屏幕右上角的汉堡菜单,然后选择“偏好设置”选项。
This will bring up the Firefox settings page. From here, you need to switch to the ‘Privacy and Security’ tab, and then click on the ‘Clear Data’ button.
这将打开Firefox设置页面。 从这里,您需要切换到“隐私和安全性”选项卡,然后单击“清除数据”按钮。
Firefox will now ask what data do you want to clear. You need to select ‘Cached Web Content’ and click on the clear button.
Firefox现在将询问您要清除哪些数据。 您需要选择“缓存的Web内容”,然后单击清除按钮。
Firefox will now delete cached web content from your browser storage.
Firefox现在将从您的浏览器存储中删除缓存的Web内容。
在Internet Explorer中清除浏览器缓存 (Clearing Browser Cache in Internet Explorer)
Internet Explorer was the default web browser on Windows computers until it was replaced by the new Microsoft Edge browser.
Internet Explorer是Windows计算机上的默认Web浏览器,直到被新的Microsoft Edge浏览器取代。
However, many users still use it. If you are one of those users, then this is how you’ll clear browser cache in Internet Explorer.
但是,许多用户仍在使用它。 如果您是这些用户之一,那么这就是在Internet Explorer中清除浏览器缓存的方法。
First, you need to launch the Internet Explorer on your computer. After, that you need to click on the gear icon at the top right corner and then select Safety » Delete browsing history….
首先,您需要在计算机上启动Internet Explorer。 之后,您需要单击右上角的齿轮图标,然后选择安全»删除浏览历史记录…。
Next, you need to uncheck the option to ‘Preserve Favorites website data’, check ‘Temporary internet files’, and optionally check the ‘Cookies’ option.
接下来,您需要取消选中“保留收藏夹网站数据”的选项,选中“临时Internet文件”,并选择选中“ Cookies”选项。
Click on the Delete button to continue, and Internet Explorer will empty your browser cache.
单击删除按钮继续,然后Internet Explorer将清空浏览器缓存。
在Edge中清除浏览器缓存 (Clearing Browser cache in Edge)
Edge is the default browser on Windows 10 computers. Here is how you will clear browser cache in Microsoft Edge.
Edge是Windows 10计算机上的默认浏览器。 这是清除Microsoft Edge中浏览器缓存的方法。
First, you need to open the Edge browser on your computer. After that, you need to click on the three-dot menu at the top-right corner of the screen and select ‘Settings’ option.
首先,您需要在计算机上打开Edge浏览器。 之后,您需要单击屏幕右上角的三点菜单,然后选择“设置”选项。
Next, you need to click on the ‘Choose what to clear’ button under the ‘Clear browsing data’ section.
接下来,您需要点击“清除浏览数据”部分下的“选择要清除的内容”按钮。
This will bring up the ‘Clear browsing data’ panel. From here, you need to select ‘Cached data and files’ and ‘Cookies and website data’ options.
这将弹出“清除浏览数据”面板。 在这里,您需要选择“缓存的数据和文件”以及“ Cookie和网站数据”选项。
Click on the ‘Clear’ button and Microsoft Edge will now clear browser cache.
单击“清除”按钮,Microsoft Edge现在将清除浏览器缓存。
在Safari中清除浏览器缓存 (Clearing Browser Cache in Safari)
Safari is the default browser on the Mac operating system. Here is how to clear browser cache in Safari.
Safari是Mac操作系统上的默认浏览器。 这是在Safari中清除浏览器缓存的方法。
First, you need to open the Safari web browser on your computer. After that. click on the History » Clear History…option from the top menu.
首先,您需要在计算机上打开Safari Web浏览器。 之后。 单击顶部菜单中的“ 历史记录»清除历史记录...”选项。
Safari will now ask you to select a time range. Select ‘All history’ from the ‘Clear’ dropdown menu and then click on the ‘Clear History’ button.
Safari现在将要求您选择一个时间范围。 从“清除”下拉菜单中选择“所有历史记录”,然后单击“清除历史记录”按钮。
Safari will now delete all temporary data including cache, cookies, and all temporary website data.
Safari现在将删除所有临时数据,包括缓存,Cookie和所有临时网站数据。
If you want to empty the Safari cache without deleting cookies and other data, then you will need to enable the ‘Developer’ menu.
如果要清空Safari缓存而不删除Cookie和其他数据,则需要启用“开发人员”菜单。
Simply click on the Safari » Preferencesfrom the top menu. This will bring up the settings dialog box where you need to switch to the ‘Advanced’ tab.
只需从顶部菜单中单击Safari»首选项。 这将弹出设置对话框,您需要在其中切换到“高级”选项卡。
This will add the ‘Develop’ menu in your web browser’s top bar. Next, you need to click on the Develop menu and select ‘Empty Caches’ option.
这将在网络浏览器的顶部栏中添加“开发”菜单。 接下来,您需要单击“开发”菜单,然后选择“空缓存”选项。
Safari will now only empty the browser cache without deleting cookies and other temporary data.
Safari现在只会清空浏览器缓存,而不会删除Cookie和其他临时数据。
在Opera中清除浏览器缓存 (Clearing Browser Cache in Opera)
If you are using Opera web browser, then here is how to clear your browser cache in Opera.
如果您使用的是Opera网络浏览器,那么以下是在Opera中清除浏览器缓存的方法。
Fist, open the Opera web browser on your computer. After that, click on the menu icon on the top right corner of the screen and then click on the ‘Clear browsing data’ button.
拳头,打开计算机上的Opera Web浏览器。 之后,点击屏幕右上角的菜单图标,然后点击“清除浏览数据”按钮。
This will bring up a popup on the screen. From here, first you need to select ‘All time’ next to the time range dropdown menu. After that, check the box next to the ‘Cached images and files’ option.
这将在屏幕上弹出一个弹出窗口。 首先,您需要在时间范围下拉菜单旁边选择“所有时间”。 之后,选中“缓存的图像和文件”选项旁边的框。
You can now click on the ‘Clear data’ button, and Opera will empty your browser cache.
现在,您可以单击“清除数据”按钮,Opera将清空浏览器缓存。
清除浏览器缓存不起作用时该怎么办? (What to Do When Clearing Browser Cache Doesn’t Work?)
It depends on what you are trying to do at the moment. Let’s take a look at some common scenarios.
这取决于您当前要执行的操作。 让我们看一些常见的场景。
1. Can’t see changes you made to your website appear on the live site
1.无法看到您对网站所做的更改显示在实时网站上
The most common culprit for this usually a WordPress caching plugin. Normally, if you are logged in to WordPress, then your caching plugin would show you a non-cached version of your website.
最常见的罪魁祸首通常是WordPress缓存插件。 通常,如果您登录WordPress ,则您的缓存插件将为您显示网站的非缓存版本。
However, due to a plugin misconfiguration, you may end up seeing a cached version of your website.
但是,由于插件配置错误,您最终可能会看到网站的缓存版本。
You’ll need to empty WordPress cache to see the live version. We have a detailed guide on how to clear cache in WordPress with step by step instructions.
您需要清空WordPress缓存才能看到实时版本。 我们有详细的指南,指导您如何逐步清除WordPress中的缓存 。
2. I cannot log in to my WordPress website
2.我无法登录我的WordPress网站
If you are unable to log in to your WordPress website and the login page keeps refreshing, then most likely it is a WordPress settings issue.
如果您无法登录WordPress网站并且登录页面不断刷新,则很可能是WordPress设置问题。
See our detailed guide on how to fix WordPress login page refresh and redirecting issue.
请参阅有关如何解决WordPress登录页面刷新和重定向问题的详细指南。
3. A third party website is not updating
3.第三方网站未更新
If you are seeing an outdated version of a third-party website while other users can see the changes, then this could happen due to a lot of reasons.
如果您看到的是第三方网站的过时版本,而其他用户可以看到更改,则可能由于多种原因而发生。
For example, the website may be temporarily down, and their CDN server is showing a cached copy of the website. It is also possible that their website firewall is not working properly, and it’s serving the cached versions to specific geographic locations.
例如,网站可能暂时关闭,其CDN服务器正在显示网站的缓存副本。 他们的网站防火墙也可能无法正常工作,并且正在将缓存的版本提供给特定的地理位置。
In that case, you can try using a VPN service. This will allow you to change your IP address and visit the website from a different geographic location.
在这种情况下,您可以尝试使用VPN服务 。 这将允许您更改IP地址并从其他地理位置访问网站。
This will help you further troubleshoot and get to the bottom of the issue.
这将帮助您进行进一步的故障排除并深入了解问题的根源。
We hope this article helped you learn how to quickly clear your browser cache in all top browsers. You may also want to see our WordPress troubleshooting tips and the complete WordPress security guide to keep your website secure.
我们希望本文能帮助您学习如何在所有顶级浏览器中快速清除浏览器缓存。 您可能还想查看我们的WordPress故障排除提示和完整的WordPress安全指南,以确保您的网站安全。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在Twitter和Facebook上找到我们。
标签:
相关推荐:
最新新闻:
- 头条:o哒取代基效应:分子中的电子效应
- 什么是浏览器缓存?如何在所有主要浏览器中清除浏览器缓存?
- 全球速看:wpcap.dll文件无法加载?wpcap.dll/Packet.dll/pthreadVC.dll丢失解决办法
- 今日精选:《坎巴拉太空计划2》预告片展示教学步骤
- 横版平台动作游戏《少女魔净》开场动画展示 环球报道
- 神谷盛治表示香草社19年暗示的新作开发现已完成
- 曝姆巴佩想买下C罗的私人飞机 交易金额未透露:热头条
- -53℃漠河美女主播启动i9-13900K、RTX4090!魔幻一幕出现 今日热议
- 全球新资讯:藩王弊端那么明显,朱元璋非要坚持分封藩王,有何深意?
- 《最后的生还者》第一集已在油管上免费提供 支持1080P:环球观点
- “今年春节档后劲最大的电影”冲上热搜 你最喜欢哪一部?-焦点热议
- 全球信息:小岛转发《死亡搁浅2》饭制海报 由预告画面拼接而成
- 游客爆料北海用餐被宰:4个菜1500元 出租车带去的
- 《死亡空间:重制版》PC版存在CPU优化问题:快播报
- 《卧龙:苍天陨落》曹操刘备孙坚角色介绍 三国人设光荣烂熟于心
- 传《飙酷车神3》即将正式公布 采用新引擎开发 全球播报
- 《最终幻想起源:天堂的陌生人》可能有续作-每日头条
- Tesla纯电皮卡继续跳票 正式量产要到2024年_世界简讯
- GameFreak谈原创IP游戏开发:不该限制在小型项目上
- GDC年度游戏提名公布:《老头环》《流浪》六项领跑-环球热消息
- 《星露谷物语》厂商新作全力开发中:零加班 所以慢-每日焦点
- 天弘丰利LOF: 天弘丰利债券型证券投资基金(LOF)2022年第4季度报告:重点聚焦
- 英国版《鱿鱼游戏》真人游戏被曝玩法苛刻 或陷集体诉讼|热点在线
- 舒淇为林心如庆47岁生日 姐妹俩托腮扮嫩状态似少女
- 男子餐厅点海鲜、葱姜费占60%?餐厅:这是加工费
- 男孩逛景区遇现实版“鹈鹕灌顶” 有攻击性需小心
- 环球观天下!让人一言难尽的NS“新操作系统”《nOS》发售
- 像素风小清新ADV《东京故事》上架steam 年内发售
- 《鬼谷八荒》官方纪念EA上线两周年:开发已进入尾声
- UE5版《塞尔达传说:时之笛》新视频 展示牧场地图
- 全球视讯!利雅得胜利提高对莫德里奇的报价:一年豪掷4500万欧
- 世界速读:《终结者2》T-1000噩梦成真 科学家开发固液变形机器人
- 辽宁上空惊现“三个太阳”幻日奇观 专家揭秘
- 返程提醒:带上健康,注意这几个细节
- 卡牌战斗新游《Spell Siege》公开 AI辅助开发时间6小时
- 当前聚焦:郭富城、梁朝伟主演《风再起时》宣布提档:2月5日元宵节上映
- 发售1天Steam好评如潮 三上真司音游《Hi-Fi Rush》GOTY预定-天天快看点
- 【全球新要闻】托比·马奎尔愿意再次扮演蜘蛛侠:我怎么会不想呢?
- 天天最资讯丨《荣耀战魂》新英雄公布 异乡人阵营再添女将
- 《最终幻想:节奏剧场》新系统情报 2月16日发售-今日讯
- 世界头条:DC《雷霆沙赞2》新预告:少年大战“龙妈”卡丽熙
- 世界快资讯:《红霞岛》联合开发商和索尼合作 开发《地平线》系列
- Neil Druckmann:顽皮狗将不再制作《神秘海域》-全球要闻
- 60.4亿!2023春节档票房超去年 《满江红》23亿领跑
- 春节假期接近尾声 假期返程小高峰将出现
- 全球头条:Epic喜+1:《Adios》等两作 下周送《界外魔之死》
- 好的引导有多重要
- 心理惊悚游戏《洛蕾塔》2月16日登陆PC平台:世界头条
- 焦点信息:尽管面临诉讼和审查 微软仍计划6月完成动视暴雪收购
- 内部人士:《艾尔登法环》正在开发“大型”DLC-当前热闻
- 世界要闻:《中国乒乓之绝地反击》改档2月17日放映
- 满江红票房破21亿!张艺谋揭秘震撼结尾 片方发声明称偷票房等指责纯属造谣 环球要闻
- 天花板!迪丽热巴被国外网站评为2023全球最美女演员|即时看
- 国外时装展惊现“穿模”礼服 网友:学了3年动画?:当前信息
- PS5精英手柄功能介绍宣传片:高自定义带来顶级体验
- 国外XSS主机大降价:庆祝农历新年 仅售1628元-讯息
- 世界讯息:《机甲战士5:雇佣兵》新DLC上线 大量新任务及对手佣兵
- 剧版《最后生还者》第三集新剧照曝光:比尔与弗兰克深情对视|焦点热议
- 《流浪地球2》机械狗笨笨智能积木开售:899元、支持手机App遥控
- 《霍格沃茨之遗》将会拥有100多个支线任务-世界即时
- 焦点快看:在《霍格沃茨之遗》中,你可以使用不可饶恕咒
- 陈坤大年初三送别儿子上学 一家三代全家福留念
- 《满江红》实时票房破20亿:观影用户评分9.4!
- 平台最贵游戏《隐秘与未知》上架steam 售价近1.5万元-天天通讯
- 电影《满江红》新剧照:赤胆忠心、一曲悲歌颂英雄
- 《红霞岛》Steam国区开启预购:标准版289元、显卡最低需求GTX 1070_全球今亮点
- 《如龙维新!极》新预告 展示队士卡片不同能力
- 厂商介绍《死亡空间:重制版》PS5版本手柄功能详情_世界速讯
- RTX 4060将发布:3000元左右 180W功耗
- 赶快升级!iOS 16.3修复了这一大Bug
- HomePod mini激活温度湿度传感器,方法已更新
- M2款Macmini加入拼多多百亿补贴 未发售先砍500元|全球快看点
- 时讯:《原子之心》进厂压盘 下月即将正式发售
- 杨紫琼入围奥斯卡影后,这次成龙亏大了_每日视点
- 【天天报资讯】小米Poco X5 Pro发布:1亿像素主摄