Have you ever been told to “clear your browser cache”? It’s often necessary for diagnosing website issues (like a 304 error). However, do you know what that means and how to clear your browser cache?
What’s a Browser Cache?
A cache is software or hardware that temporarily captures and stores data so the user can access it in the future. Caches are especially helpful for websites, as they reduce load times.
There are many different types of caching, including browser caching, distributed server caching for high-volume systems, application caching for logged webpages, update data caching for content management systems and gateways, and much more.
As a subset of caching in general, browser caching:
- Is a software element stored on whatever browser you use to peruse the internet.
- Uses a small database, much smaller in size than server or standard website cache systems.
- Takes downloaded data (no longer online, but in a local, client-side environment) from websites you visit. In short, it stores the data on your computer.
- Stores website resources such as coding files, media assets, and personalized site preferences.
- Uses the stored website resources to deliver them faster in the future.
- Utilizes that data to provide a more desirable user experience.
To understand what a browser cache is, you first need to know what a browser does. A browser is responsible for loading content from the internet and displaying it on your computer screen. When you visit a website, your browser takes elements (text, images, etc.) from that site and stores it in the “browser cache” in your system. The next time you go to that website and the connection is slow or missing, this cached version will be displayed instead of loading from the internet again. On a slow connection, this decreases load times drastically because your computer doesn’t need to download all the data for a page before it can display it.
Many customers only care about page loading speeds when they change their browsers. The user experience is just as essential when it comes to making changes. For example, the browser cache syncs your user site preferences like color schemes, which will make websites easier to read.
Here are some of the main types of site resources that are saved within your browser’s cache:
- Website data and assets like written content, images, videos, and coding filesmake it easier for the site to load up faster in the future and provide options to view some parts of a website while offline.
- Documents from web apps bolster the effectiveness of viewing pages in an offline environment.
- Valuable or repeated website activity such as automated login credentials or products left in a shopping cart.
- Personalized user preferences for specific websites or the internet in general. For instance, you may adjust settings like the font size, typography style, color scheme, or browser zoom.
Here’s an example:
Marla likes to buy her home improvement items at Overstock.com. She also gets her comedy and news fix with The Onion and Wall Street Journal Online, respectively. As a busy small business owner, Marla needs ways to sneak in some internet browsing while at lunch or before bedtime, despite the limited connection she has when traveling to rural areas that often lack reliable internet.
Browser caching benefits Marla in the following ways:
- It saves the items she previously added to her Overstock.com cart, making it easy to check out in the future.
- It keeps her login credentials saved on all sites, allowing her to enjoy immediate access to her WSJ subscription, The Onion, and Overstock. It also handles any login credentials for browser-based emails.
- The Onion, and every other site, loads written content, images, and site files rather quickly, so she’s not wasting her lunch hour waiting for pages to render.
- The browser cache saves her personal preferences for much larger font sizes and white backgrounds on The Onion and the WSJ. This accommodates her visual impairment while reading articles.
- Her most visited sites still load their content (or at least some of the content depending on the website) when she travels to areas with poor internet connection. That’s because her frequently visited site resources get stored in the browser cache.
How a Browser Cache Works
Here’s a more technical look at how a browser cache functions:
- The browser (let’s say Firefox) notifies the web server that it would like some content, most likely from a website. This is called a request.
- At the same time, our Firefox browser looks to its database, the browser cache. It’s checking to see if any data from the website requested was previously cached (saved inside the cache).
- If the requested content isn’t in the browser cache, it gets sent directly from the webserver. This is called a response.
- If the requested content is found within the browser cache, our Firefox browser ignores the server and pulls the content from its cache.
The cache can’t only contain the correct data for the desired webpage – it also needs to be “fresh” data. The risk is that a browser will encounter stale cache content because all cached data will eventually expire. It would be irresponsible to log and serve up outdated website content to users, seeing as how site content changes regularly.
In general, the browser pulls content from its cache when the data it contains is not outdated.
We discussed the data that is stored when browsing, but it’s also worth mentioning that on the client-side, there are a few different types of packets and databases to handle these logs. From a fundamental perspective, the browser cache stores resources like login credentials and site content. These resources might get stored with other types of databases like cookies, Web Storage APIs, IndexedDB APIs, and Cache APIs.
How To Clear Cache
The number one thing to remember is that you need to clear your browser cache when your browsing doesn’t respond as it previously has. After that, we’ll show you how to clear the cache on most major browsers. If you want to quickly jump to the “how”, just click on one of the links below. Otherwise, we’ll start at the beginning.
Why Do You Need to Clear Your Browser Cache?
The majority of the time, you won’t notice that browser caching is happening. It runs completely in the background and it typically doesn’t affect your browsing experience. But sometimes things can go wrong and it causes problems with your website’s performance.
One issue that can come up is when browsers are still serving up cached versions of the resource. Your browser might be displaying a newer or older version of the page. Another problem is when caches become corrupted, which will impact the whole web page and make it not work properly.
Clearing your browser cache is something you should always do when you experience an issue on your site (or someone else’s site). It won’t always fix the problem, but it’s an easy first diagnostic step that can identify if more complicated issues are causing problems.
MAMP is a local web development solution that can cause you to encounter the “This site can’t provide a secure connection” error without clearing your cache. Even though there might be something wrong with your website, it’s more likely that it’s just a caching issue that can be fixed by clearing your browser cache.
How to Force Refresh a Single Page
A force refresh is one trick to try if you’re experiencing a slow web browser. When you clear your cache, all of the cached data that have been loaded will be removed. However, clearing your cache might not do the trick. The fix is to use some hotkeys on your browser to bypass the cache and forcefully refresh all of the data:
- Windows and Linux browsers: CTRL + F5
- Apple Safari: SHIFT + Reload toolbar button
- Chrome and Firefox for Mac: CMD + SHIFT + R
One thing to keep in mind is that this option only works on the specific page you’re on. It leaves the rest of your browser caching untouched. This is why it’s better to use if you want to retain those other pages while fixing a single page. If you want to reset your browsing experience completely (say, across an entire site), clearing your browser cache would be a better option.
How to Clear Browser Cache for Google Chrome
To clear the cache for Google Chrome, start by clicking the three dots in the top right of your browser window. Then, find the More Tools option and select Clear browsing data… from the submenu:
You can also use the following keyboard shortcut: CTRL + SHIFT + DEL. Chrome will open up a new tab with a pop-up window titled Clear Browsing Data. If you want to clear your browsing history, make sure that only the Cached images and files box is checked. Otherwise, you can determine to do a more thorough cleansing of cache by checking Cookies and other site data in the cache clearing section as well.
You can change the time frame by selecting the Time Range field and choosing one of the options, like the last 24 hours, the last 4 weeks, or all time.
To reset your browser cache, click the Clear data button on the Privacy and Security page of Chrome Settings. That’s it! Now your chrome browser cache is clear.
It’s important to remember that browsers also store secondary data within the cache, data that doesn’t get cleared with the default tool. This is usually more sensitive data that you wouldn’t want to delete.
In Chrome, you can clear data by navigating on the Advanced tab in the Clear browsing data window. This is helpful if you experience a website crash or if you’ve been blocked from accessing a website due to malware.
Now, you’ll see additional browsing data checkboxes such as:
- Passwords and other sign-in data.
- Autofill form data.
- Site Settings.
- Hosted app data.
You can choose to mark whichever data items you want deleted. These are usually essential for improving your user experience, like when passwords help you log into websites in a split second.
Click on the Clear Data button once you’re done.
Google Chrome has multiple aspects of its cache, and some ways to delete it.
For example, you can go to the settings page for Google Chrome and click on Privacy and Security.
Under that, there’s a button called Clear Browsing Data which brings you to the same popup window that we saw before. This time, though, it’s found by going through different steps.
Rather than defaulting to prompt, you can also go down to the “Cookies and Other Site Data” option and pick what controls to take.
The Cookie button.
A tracking cookie is the means by which some third-party services are able to track your activity on the web. All cookies are logged in your browser cache so this is an option if you’re more interested in cleaning out cookies than your browser history or login information.
On this page, you have options to:
- Allow all cookies.
- Block third-party cookies in Incognito.
- Block third-party cookies.
- Block all cookies.
These settings allow you to update your cache or remove unnecessary elements. For example, you might choose to block third-party cookies so that you never have to worry about cleaning them out of the browser cache again.
You can also Clear Cookies and Site Data When You Close All Windows. Essentially, that will automate the cache clearing process for you. Whenever you close Chrome, you’ll be deleting items from your browsing history without any added effort on your part.
You can choose to block or allow cookies within Google Chrome. You also have the option to select “allow all cookies” or clear out cookies and web site data when you close Chrome.
Choose how to manage cookies.
There are several other options in the Chrome browser cache that I’ve already shared with you.
You can tap the ‘See All Cookies and Site Data’ button to clear out any cookies individually.
You will also have options to create lists of websites that allow cookies, clear cookies automatically when a window is closed, or block cookies outright.
Clearing the cache in your browser is a great way to fix the ERR_SPDY_PROTOCOL_ERROR issue in Google Chrome.
How to Clear Cache for Mozilla Firefox
To clear the browser cache in Mozilla Firefox, get started by clicking on the Hamburger icon in the top right and selecting History.
In the menu that appears next, select Clear Recent History…
In order to access your browser’s cache, you can do so by pressing CTRL + SHIFT + DEL. A popup will then be opened with the Time Range to Clear dropdown. Select the Cache tab. Consider also deleting the browsing history, cookies, search history and data items like site settings and offline website data from saved files.
Use the Time Range To Clear menu to set how far back in time you want to go when clearing out the cache data. You can choose the entire history or even just the last hour.
The next step is to select all the options listed, then press the “OK” button. This will clear your browser cache in Firefox.
As an alternative to setting browser cache, you can go back to the three-lined hamburger icon and choose Settings.
Choose Privacy and Security.
Under the Cookies and Site Data section, you can use the Clear Data button.
Using this method of cleaning out cache data is slightly different from the previous one.
This deletion removes cookies and cached web content, so you don’t have to keep sorting through them. This popup window informs you that, with this deletion, you are freeing up an immense amount of storage space.
Click the Clear button to finish.
Also, back on the Privacy and Security page, you’ll see the following options:
- Manage Data.
- Manage Exceptions.
- Delete Cookies and Site Data When Firefox is Closed.
The Manage Data button on the Firefox Extended Features Preferences Panel lets you customize how data is collected and managed. You can delete items individually or create exception rules to set what cookies or site data are deleted when Firefox closes. It’s also possible to automate clearing your Browser Cache, but only when you close the Firefox program itself.
The Firefox menu includes an area known as History. Within this section, you’re able to clear what you’ve seen before. Simply select what you want to delete, and select the Clear History button.
In the settings, there is a dropdown menu to auto-load content from your browsing history. Alternatively, it may be used to automatically prevent the cache from saving data.
How to Clear Cache for Safari
To clear the browser cache for Safari, you have a couple of options. If you can’t live without your browsing history, cookies, and website data, clearing your entire cache is pretty simple. Just head to Safari > Clear History and it will wipe everything clean.
When you delete cache data, a window will show up and ask you how long you want to delete it. You can choose from the last hour, a few days, or even the entire history.
To finish, just click on the Clear History button. That will eliminate Safari’s cache of cookies and website data.
The good thing about Safari is that it has lots of options for managing the cache.
To activate these, go to the menu bar and select Safari > Preferences.
When you find that Safari is acting slow, clearing its cache may fix the problem. It’s an easy fix to make by adjusting the field to Remove History Items. You’ll choose a certain period (like after one year), and Safari automatically clears the browser history cache after that time has passed.
You’ll also want to go to the Privacy tab which provides an area where you can individually manage cookies and website data.
You can ensure that your cache never logs any of those cookies in the first place by checking the “Block All Cookies” box. This means that you won’t have to spend time clearing them out of the cache yourself.
It’s worth paying attention to the Manage Website Data button, too.
This browser cache page presents a list of websites you currently have stored in your browser. You can either delete them individually or click on the Remove All button.
The Manage Website Data module shows cache data from all the websites you’ve visited.
To clear only the browser cache instead of clearing browser history, cookies, and site data, go to Safari > Preferences > Advanced and check the Show Develop Menu in Menu Bar box.
Then, you can go to Develop > Empty Caches to clear Safari’s browser cache.
And those are all the ways to clear the cache in Safari!