Clearing Your Browser Cache
While building websites, I often tell my clients to clear their browser cache (“CASH”) as changes are made during the development process. Often, they don’t know how. It’s easy to clear your cache. I will explain what a cache is, why you would want to clear it and how clear it on different web browsers and devices.
What is a browser cache?
A cache is a “container” or temporary location on your local computer that your web browser stores some files when you request a web page. Some parts of a web page don’t change often. By storing these files locally in your web browser, it can help with loading a web page faster if you don’t have to load the same files every time you visit a web page on a website.
What is a browser cache for?
Your browser will store files that are consider to be “static” (they don’t change often) in order to speed up the delivery of a web page for you. For example, images like a logo, favicon, buttons all may be cached so each time you visit a page on a website, these repeated images do not need to be requested from the Internet again.
Parts of web pages that don’t change often include:
- images – including icons, backgrounds, logos
- Stylesheets – CSS
Issues with browser caches
During web development, caching can become an issue because static assets on a website change a lot while a website is being built. Files that I have changed may be “stuck” in your browser cache. The problem with this is when I tell you to view a web page to see updates I have made, and they say they don’t see them. It is because files that I have changed are not being seen because they are being referenced from your browser cache.
Not a big deal, and easy to fix. I just have to explain how to clear your cache.
Clearing a cached page
Most of the time I explain how to clear a single page out of a browser cache. Clearing your whole browser cache will empty it for all web pages on all websites. That’s not necessary for my purposes.
There are so many types of browsers and devices, they are not all the same. In general though, to clear a single page, this is what I do:
1. HOLD DOWN YOUR SHIFT KEY ON YOUR KEYBOARD
2. CLICK THE RELOAD BUTTON IN BROWSER
That’s it! The page you are viewing should now be cleared from your web browser’s cache and you should see the web page updates I have made. I f not, do it again, sometimes files “stick in your cache”.
How long do files stay in your browser cache?
It depends on several factors, including your browser settings, how much storage has been used and how much you use your web browser and if a web page response headers tell the browser the page has changed.
How to clear your browser cache in different browsers
Taken directly from the source, here is documentation for different types of browsers.
Clear Google Chrome browser cache
Clear Microsoft Edge browser cache