Clearing the cache and browsing history

I find myself repeatedly telling my clients to clear their cache and browsing history when I’m developing or just updating a website.

Why? Here’s a little explainer. Your internet browser (Chrome, Firefox, Safari, IE) stores some files from your website to your computer or to your mobile device.

Files that are cached locally include any documents that make up a website, such as html files, CSS style sheets, JavaScript scripts – as well as graphic images and other multimedia content.

What this means is, when you visit your site again some files are not downloaded ‘fresh’. So you see parts of your site which have not been updated, even though they actually have been.

So, to see this fresh content, it’s vital to clear the cache and browsing history. It makes your life easier – and mine.

How to clear the cache

Refresh/reload the page several times. Or use this smart extension Clear cache extension for Google Chrome: https://chrome.google.com/webstore/detail/clear-cache/

You can also follow follow these manual instructions:

Desktop Chrome

  1. In the browser bar, enter:
     chrome://settings/clearBrowserData
  2. At the top of the “Clear browsing data” window, click Advanced.
  3. Select the following:
    • Browsing history
    • Download history
    • Cookies and other site data
    • Cached images and files

    From the “Time range” drop-down menu, you can choose the period of time for which you want to clear cached information. To clear your entire cache, select All time.

  4. Click CLEAR DATA.
  5. Exit/quit all browser windows and re-open the browser.

Desktop Firefox

  1. From the History menu, select Clear Recent History. If the menu bar is hidden, press Alt to make it visible.
  2. From the Time range to clear: drop-down menu, select the desired range; to clear your entire cache, select Everything.
  3. Next to “Details”, click the down arrow to choose which elements of the history to clear; to clear your entire cache, select all items.
  4. Click Clear Now.
  5. Exit/quit all browser windows and re-open the browser.

Sometimes I do implement codes for forcing fresh content, like this:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />

But these codes should not be implemented permanently. This is because your website will have a slower loading time, thanks to everything having to be downloaded again. I hope this is helpful.