You may be asking yourself “What even is caching?”. If you are… you’ve come to the right place. We’re here to explain and let you know why you should be using caching techniques on your website to increase performance and customer retention.
What is ‘caching’?
Caching (pronounced cash-ing) is a method of storing the content on your website in lots of different places so that next time a user visits your website they don’t have to download that content all over again. If you’ve ever emptied your browsers cache you may have been surprised by the hundreds of megabytes of stored content you never knew you had.
There are two main methods of everyday caching that we’ll talk about and they’re page caching and browser caching.
What is browser caching?
When someone visits and loads your website for the very first time, unbeknown to you, it’ll also be downloading these cached items and storing them in your browser.
Let’s say you’re browsing a website for a new t-shirt – often you’ll see rows and rows of images of all different style t-shirts to choose from. You find one you like but it’s a little too expensive. You close your browser and go make a cup of tea whilst you ponder the decision of just adding it to your cart and buying it anyway – paid day is next week, why the hell not!
You load up the website again but this time, you notice it may be a few seconds quicker – that’s because your browser already has those rows of t-shirt images saved. Your browser doesn’t need to download them all over again to display the page. Thus making your experience on the website quicker.
Don’t worry – there is a length of time these files are stored and then deleted.
Why is it important to use browser caching?
Optimisation – One of the things I tell people the most is that you have just 3 seconds for a website to load. After 3 seconds visitors will start to exit your site and increase bounce rates (a user hitting and page and coming right off). Cached content means that as someone browses through your website they’re not having to download repeat assets over and over again. This increases performance and customer retention.
Reduces network costs – In an ever growing mobile first world it’s important to provide customers with cost effective solutions. It may not be such a big worry, now mobile networks are starting to introduce unlimited data plans, but the majority of mobile users have data caps. If customers frequent your website on the regular then they’re having to download your website content over and over, using their mobile data each time.
Availability and Stability – In some cases, even if your website or server goes down, cached content can still be shown. Just on the off chance something does happen then a customer may still be able to find your email or phone number to make a business enquiry.
What is page caching?
This is a slightly more complicated version of browser caching. Instead of the browser doing all the work, it’s the server the website is hosted on that performs the caching.
Ecommerce websites see the best benefits from page caching here. What some people don’t know is that often information on a web page, such as a product, is pulled from lots of different places in a database. In software such as WooCommerce, a product will be an automatically generated web page pulling information such as images, product name, price, description etc from a database and putting it all in the right place on a page. This cuts down hugely on manually created thousands of product pages individually. However, that means the server has a lot of database queries to run each time a product is viewed.
With page caching enabled, the server can essentially save a snapshot of the product that’s already been loaded and serve that to the next customer to view the product. Basically a “here’s one I made earlier!” scenario.
Why is it important to use page caching?
The same reasons as to why you’d use browser caching. It’s all about performance and optimisation. Not only are you providing a quicker more efficient browsing experience for your customers. You’re also showing search engines that you’d put the effort in to produce a great performing website that they’re more likely to show in their results.
Are there any downsides of caching?
Whilst yes, there are some downsides of caching, these certainly don’t outweigh the benefits of using a caching policy.
If you do cache your website, you may have the problem of serving your customers old content.
For example, you run an online shop that sells candles and unfortunately you’ve run into a jar supply problem and you’ve changed the shape of your jar. So, you change the product image of your candle to the new jar. I’m a returning customer to your website and I want to buy the same candle I bought last week. I view the product but the website and server is showing me the cached product image of the old jar before it was changed. I order the product and in the post I get the different shape jar instead. I’m confused and may contact you to say I’ve received the wrong product.
However, as with all things caching, you can set expiry times. The above situation can be resolved by simply either flushing (deleting) the entire cache every time a change is made to the website. Or you can just tell the website and server to flush the cache every week. Serving old content is a relatively rare occurrence, as there are practices in place to minimise this.
If your website relies on certain files being executed at specific times such as pop ups or live chat modules – sometimes caching can stop these files from running which will disable those features from working. This is where you need a developer who knows what they’re doing – you can set certain files, code or even entire pages to be excluded from caching policies so you never run into these problems.
Got any questions?
If you’d like to know more about caching or any other services that we offer, please don’t hesitate to get in touch.