Monday, September 11, 2017

Keep Calm and Clear your Cache - when web designers are trying to be helpful!

"Clear your browser cache" (CYBC) is the first response that tech people (I include ourselves in that description, even though we are primarily designers) will give when you encounter a web page problem. We'll look at why that is and how to clear the browser cache.

The browser cache appears in more answers than questions, but it often causes even more questions. Even when following instructions to empty the cache, many people aren’t clear on what this piece of magic really is, or why clearing the cache does anything at all.

Let’s review the browser cache, what it is and why it exists. Along the way, we’ll review the steps to clear it in Internet Explorer, Firefox, and Chrome and try to dream up some reasons why that sometimes helps.

The browser cache

The cache exists because of a basic assumption made by browser designers: the internet is slow. More accurately, your internet connection is slower than your computer.

What that means is that it’s faster to get something from your hard disk than it is to get it from the internet. Even with today’s faster internet speeds, that still holds very true.

Browser designers noticed that most web sites had many of the same elements on multiple pages. For example, if you look at most pages, you’ll see a logo at the top. So the thinking was, why download the same logo for every page? Why not just download it once and then keep it so we can use it again?

That’s what the browser cache is for. The cache is nothing more than a place on your hard disk where the browser keeps things that it downloaded once in case they’re needed again.

When you first visit a page on a site, the browser downloads the logo into the cache, and then displays it on the page you’re viewing. For each additional page you visit, the logo doesn’t need to be downloaded again; as long as the same logo is displayed, it’s already on your hard disk.

The cache has a size limit, which you can usually configure. When the cache gets full, the items in it that haven’t been used in a while are discarded to make more space.

Naturally, there’s a little more to it than that. For example, there are ways to update the logo on a site and have that override whatever is in your cache, so what you see is always up-to-date. But by and large, that’s all it is: a place to keep things locally so you don’t have to download the same things over and over again.

And it’s all transparent to you. Until something breaks, or more usually if you are having a site built and developed, when you are continually reviewing the pages. This is when CYBC becomes imperative, otherwise you'll never see what is really 'live' on the site until you do so.

Clearing the cache
Clearing the cache just means emptying it, so that the next time you display a web page everything must be downloaded anew.

For reasons I simply can’t explain – other than by saying “stuff happens” – the cache sometimes get confused. This seems to happen to most all browsers and at random times. What you’ll see are partially loaded or badly formatted web pages, incomplete pictures, or, in some cases, the wrong picture in the wrong place.

It’s not always a caching problem, but because it happens often enough, “clear your browser cache” is often one of the first diagnostic steps you’ll hear from people like us.

Here’s how

Simply visit by clicking here and select your browser type.

I kid you not, you will get fed up to the back teeth of hearing us ask you to CYBC, especially if your site is being updated or renewed by us, however it really is the only way for you to see what are actually the live pages.

Some questions often asked:

If I have to clear my cache,  then won't my customers also have to do the same?
Most likely no. You are constantly vieiwing your demo site while the site build is in process. Your customer most likely visits your site periodically. When they visit your new site they will have never seen it before and as such ALL the pages they view will be new and will be 'forced' by their browser to download.

Does emptying my cache cause any problems?
No, it simply 'forces' your browser to reload all pages (even bookmarked ones) to reload from scratch.

Will I lose my data stored in my browser?
The only data that disappears is cookies and page data. If you are responsible then you should never really store private data in your browser cache, (I'm talking bank/SM passwords etc) what happens if your tablet or laptop gets stolen? In any case, you can choose to empty your cache and retain this data if you wish, just use the preferences when clearing the cache.

Isn't refreshing my page page clearing my cache?
No. If you click on the refresh/reload button  on your web browser, this will trigger a “soft refresh” on the web browser where it will check against the web server to see if the files are modified. If modified, the web browser will pull the latest version of the file and if not modified, the web browser will continue to use the cache version. In many cases the file name is the same so the cached file will be the one you see, and not the modified updated one with the same name.

In Conclusion

I hope that you find this information useful and trust that it helps to demystify some of the issues and questions you may have. If you'd like a more detailed discussion then please feel free to call us on 01332 291141 and we'll be happy to help and advise.

No comments:

Post a Comment