What is caching?
Author: Kenneth ([email protected])
Published: Sunday March 14, 2021
In this article, we will discuss browser caching for websites.
The benefits of caching
Caching improves and speeds up browsing. Once you’ve downloaded an asset, it lives (for a time) on your machine. Retrieving files from your hard drive will always be faster than retrieving them from a remote server, no matter how fast your Internet connection.
You’ve enabled asset caching for your website. The next day, you decide to change the color of your logo. You swap out the old logo for the new one and check your live website to see how it looks. But the old logo is still there.
Assuming you completed the image swap correctly, the problem is usually caching.
Your machine has a cached version of your logo on the hard drive. It never bothers to request a new download of the image. Therefore, your machine will not obtain the new logo until the cache file it has on hand expires.
For the most part, this doesn’t happen because the server knows which assets have been updated and need to be replaced on the user’s machine.
Clearing the cache
Clearing the cache just means emptying it, so the next time you display a webpage, everything must be downloaded anew so that your website loads all files correctly.
As a website owner, if one of your customers complains that the site is broken for them and no one else, then you should advise them to clear their browser cache.
If your a user, the first thing to do when a site is not loading properly is to clear your cache. Steps to clear your cache are below.
Ctrl + Shift + R or Ctrl + F5 is a keyboard shortcut used to perform a hard reload of a web page in Google Chrome, Edge and Firefox.