What is Caching And Why Does My WordPress Website Need It?
In many ways, website cache is the secret to the way the modern internet works, a small cog in a giant wheel that is nonetheless essential.
Oops! We could not locate your form.
In many ways, website cache is the secret to the way the modern internet works, a small cog in a giant wheel that is nonetheless essential.
Building and maintaining your website is a complex undertaking.
The website has to be intuitive, comprehensive, and mobile-responsive. It has to be visual and dynamic enough to keep users interested. Yet, it also has to be fast.
Combining all of those elements would be impossible without a little thing called caching.
In many ways, website cache is the secret to the way the modern internet works. A small cog in a giant wheel that is nonetheless essential. But it can also become problematic.
Ever wonder why content you’ve updated on the backend doesn’t actually show up for end users? Blame caching.
Caching is the most frequent cause of support queries for our clients, but with a few simple clicks balance can be restored.
So consider this your comprehensive guide to caching.
We’ll explain why it’s essential for fast websites and why you should consider factoring it into your WordPress website, to help improve page load times and ensure a better experience for your users.
Caching as a concept has existed almost as long as the internet itself.
In 1967, IBM released a new computer with a major improvement: it would be able to collect data on an intermediary ‘store’, allowing the system to bypass core processing for repeated tasks.
In his book IBM’s 360 and Early 370 Systems, IBM Journal editor Lyle Johnson who coined the term cache, compares the concept to the front desk of a library. It’s a temporary store for frequently used items that don’t have to go back on the bookshelf.
Anyone wanting to check out these items doesn’t have to wait the extra time it takes to seek them out. Because they’re so popular, they’re already available.
Or as Impact Media’s James puts it…
“You hit the gym daily, but don’t want to carry your trainers on your daily commute into London. So you take them in once and leave them in a locker. They are there when you need them and every now and then you need to clear out your locker (or wash your trainers) and website caching works in the same way. But less sweaty and smelly.”
It’s been more than 50 years since the term was coined, but this concept hasn’t changed.
Today, caching has become a core part of the way nearly any website operates.
Those great graphics, animations, and embedded videos can only load as fast and play as smoothly as you want because elements of the website are pre-stored on intermediary storage (either in the user’s browser or on a server for the website) that makes them easier to retrieve.
TechTerms.com explains exactly what that means in practical terms for the user:
When you visit a webpage, the browser may cache the HTML, images, and any CSS or JavaScript files referenced by the page. When you browse through other pages on the site that use the same images, CSS or JavaScript, your browser will not have to re-download the files. Instead, the browser can simply load them from the cache, which is stored on your local hard drive.
The same is typically true when you go back to the website. Without caching, those fast load times every marketer craves would be impossible to achieve.
Caching exists in almost every aspect of computing today. When it comes to your website, three distinct types of the process become especially relevant:
Every major browser, from Google Chrome to Mozilla Firefox, saves certain elements of each website visited to increase user-friendliness.
Well-built websites can communicate with users’ browsers when the content is outdated to clear the cache, and every user can manually clear their cache as well.
Think of it as similar to browser cache, except stored on the client side. Again, it’s an intermediary host that stores elements like images, style sheets, and JavaScript.
Because it’s controlled by the website, it’s a bit easier to flush when needed.
This is the furthest away from the end user, and also the most permanent in many ways. The content to be loaded quickly is stored on a separate server, which avoids overloading a single server anytime a user visits a website.
Access speed to the website increases drastically, but it’s also the most complex to set up and manage.
Make no mistake, caching happens on every website because of just how important it is to the modern user experience. More specifically, its benefits revolve around site speed, server stability, and content availability.
We’ve already hinted at it. The biggest benefit of caching is site speed. If your browser, or the website you visit already knows exactly what’s coming, they don’t have to request it.
Research suggests that a loading a cached page can reduce HTML requests by more than 90%. In non-technical terms, that means your server will only need to load a little more than half of its total content.
It’s difficult to overstate the importance of that reduction.
Your website visitors, regardless of your industry, expect your website to load quickly. If it doesn’t, they’ll bounce. In fact, research by Google found that 50% of users will abandon a website if it takes more than 3 seconds to load.
Fewer requests to your server, and less data needing to be downloaded each time, also improves the stability of your website.
Downtime can happen easily because of server overload. You’d hate to get that influx in web traffic you’ve been waiting for, only for your site to crash because the server can’t handle it.
It’s not like the cache is a magical solution to that problem, but it does help to prevent it. If the data is already stored locally or on an intermediary, the core server can focus on new users and fresh content. Just like that, you get a more stable website.
Finally, content availability becomes a major advantage of this tool. Should the service interrupt or the server temporarily go down, fully cached sites can still load.
Even in the more common scenario of an overloaded server, cached content will become more relevant in building continuity with users who’ve been browsing on the site already.
With the benefits out of the way, let’s focus on the opposite end of the spectrum. Caching is essential for any modern website, but that doesn’t mean it’s without its faults.
We’ve already discussed the most obvious and common problem above. But it’s worth reiterating again. Perhaps the most frequent cache-related issue you’ll run into, is when you publish new content, but it just doesn’t seem to show up on the website’s front end.
Browser and website caches continue to load the old content until they deem the new replacement more relevant. That can take a while.
That tends to be annoying at best, and problematic at worst. Think about what might happen if you add a new blog post, job opening, or event and the information doesn’t show up on the front end.
What was supposed to be a timely update now becomes a complicated mess complete with confused site visitors.
When timely updates don’t show up, it’s annoying. When old content remains online just because the cache doesn’t realise is just as bad and can be even worse.
We won’t bore you with the details about header coding that tells your cache what to do. When you work with the right web development partner, they can take care of that. Still, it’s worth diving into the importance of telling browsers when to clear old caches.
Think about what happens when your pricing information is outdated or the leadership in your about us section is no longer accurate. You will want to post new content. Otherwise, your users will run into inconsistent information that does nothing but confuse them.
A cache that simply stores old content forever, an uncontrolled cache in other words, can lead to this type of issue.
Finally, caching becomes problematic for any specific or even sensitive personal information. You will notice that banks and other monetary institutions never cache credit card info or anything else that could lead to identity theft.
Naturally, they have an incentive to keep that information as close to the chest as possible. Caching and security don’t always go hand in hand.
Yes, there have been breaches specifically targeting web caches. That’s why best practice is always excluding these pages from your larger caching tool. Even when you do, when you consider the information harmless enough to temporarily store through caching, you need a strategy in place to minimise any potential problems and maximise the benefits.
Every comprehensive website strategy has to include a caching component. That helps to build on the benefits and increase speed and stability, while minimising the potential problems that can occur as a result. Much of that strategy lies in the coding of the website itself.
First things first. The most controllable type of caching discussed above is website caching.
Server caching is more complex, while browser caching depends in large part on the user. You can influence both and gain influence if your website lives on a private server, but it’s typically a good idea to start with web caching in building out your policy.
The first step has nothing to do with coding. Instead, it simply involves going through your sitemap and determining where caching makes the most sense.
High-traffic landing pages that don’t require a login tend to be the most natural fit.
On the pages you identify exactly what elements you want to cache. Possibilities might include:
The list can extend beyond these, but that tends to be a good starting point.
When in doubt, talk with your web development partner about their experience and recommendations for your site as it’s being built out.
This is where it gets complicated. Through header tags, an experienced web developer can set various rules for each published page.
These header tags may determine anything from when a piece of content should be deemed stale (and no longer stored) to content that should never be cached to begin with.
If you’re not an expert in coding, this can quickly become too complex to manage. Most page templates have pre-existing code already built in, so you might just want to check with your web developer to see if there are any custom rules you should be aware of, and what their recommendations are.
As we’ve established in the caching challenges above, even a good strategy with these header tags may not be enough. You don’t always know ahead of time when new content drives the older variation out of business. Fortunately, WordPress makes flushing all existing caches relatively simple.
Some plugins can help. Other builds have this option built-in to the actual solution. Talk to your web developer about what exactly it takes, and of course, clearing your cache on your browser could be a simple and great step to take care of the issue.
Be careful though, flushing the cache too often can cause those slow load times and potential server instabilities discussed above.
Make sure you have a good reason to take this step, such as new core content that absolutely cannot wait to cycle through the ‘regular’ process.
It’s a relatively small component of the larger website build. Yet it’s hugely important. Knowing the basics about caching can help you build a better online presence. Of course, it also has to be managed right.
Understanding what you’re dealing with is the first essential step. Knowing how to manage it comes right after.
When in doubt, bring it up with your web agency. That helps you better manage your website, and make crucial improvements in the future.
You don’t have to be a developer to leverage caching the right way. You just have to work with a good development partner.
Reach out to Impact Media with any questions on the topic, and for help in creating a caching solution for your WordPress website that improves your website speed without compromising its stability or quality.
See how the likes of Tungsten Publishing, Tollring and Automation Logic have experienced immediate performance improvements by moving onto one of out Support Plans inclusive of managed WordPress optimised hosting.
Consider our WordPress website health check audit, where we can identify other ways to help improve speed, security and performance.