Website Cache Explained: How it Makes Your Site Faster

SHARE NOW

Cache is a term coined back in 1967 by IBM System Journal’s editor Lyle R. Johnson.  It works on a simple principle: providing temporary storage for computed content to be accessed later.  It acts as a memory bank, making it easy to access saved data rather than re-downloading and processing it every time you visit a website.

If I ask you what 5×4 is, you’ll know the answer is 20. You didn’t need to work out the math – you’ve done this multiplication so often that you no longer need to.  You just remember the answer.  That is how caching works.

Websites are viewed thousands or sometimes millions of times per month.  Each time a browser requests a web page, the server must do a bunch of calculations – pulling posts and images, calculating who’s on air now, deciding if the events are current, displaying the correct banner ads, weather information, and so on.  In most cases, especially over short periods of time, the result of these calculations will be the same.  The cache stores these calculations and presents them with a much faster web experience.  This leads to better SEO scores and increased user satisfaction, not having to wait for the page to load.

Today, we will cover different levels of cache and why they benefit your radio station website.

Types of Caching

Without getting too technical, there are two broad types of website cache — browser cache and server cache. Browser caching is done on the user side within the browser, while server caching is (you guessed it) done on the server.

Browser Caching

When you visit a website, the browser you’re using takes pieces of the page and stores them on your device. Some of the assets your browser will store are:

  • Images – logos, pictures, backgrounds, etc.
  • HTML
  • CSS
  • JavaScript

Browser caching allows your browser to store these files for specific amounts of time, so it doesn’t need to retrieve them every time you visit the website.

The best way to see browser cache in action is with an exercise.  First, load any website.  For example, visit our main demo page at https://www.launchfm.com.  If you haven’t been to the site in a while, you may notice that it takes a second or two to load.  Now, in the same window, visit any other website, like your own station website.  Once that page is loaded, click the back button in your browser.  Instead of taking a second or two to load, the Launch FM website loads instantly.  That is because nearly the entire page was delivered from your device – or the cache – not the server.  It didn’t have to make a bunch of requests from the server to download images and process any coding, so the page was instantly loaded.

Server Cache

Server cache speeds up websites for everyone, not just for returning visitors.  When a browser requests a webpage, the server takes time to process the information.  After that first request, the server “remembers” the processed content and delivers it faster to subsequent visitors.

Reducing loads on the server is one of the biggest benefits of server caching.  With the proper server cache, millions of visitors can open your website simultaneously, and it won’t bog down or time out.

You may have come across the terms “object cache” and “full-page cache.”  These are both server caching methods — the full-page cache is what we’ve been talking about so far, while object cache only stores pieces of data, as opposed to a full page.  This can be useful within your website’s code when delivering the result of more complex operations.

While your hosting server cache does most of the work, there’s another type of server cache that can help: your Content Delivery Network.

Content Delivery Network (CDN)

We believe every website should utilize a CDN.  Caching is one of the CDN’s jobs.  It stores your website at geographically distributed locations around the globe to reduce load times, protect against cyberattacks, and help handle vast amounts of traffic. Browser requests get routed to a CDN closest to that request, which shortens the distance data travels back to the user.  Think of someone in the armed forces pulling up your station website overseas to see what’s happening back in their hometown.  With a CDN in place, the website will not take forever to load because it’s being served from a location closest to them.

If you or your service provider doesn’t utilize a content delivery network for your station website, then get one immediately.  There are many great options out there.  Cloudflare.com is a free content delivery network.

Downsides to Cache

However great the caching system is, no one is entirely safe from cache-related issues.  Cache issues can specifically be related to a user’s device, the content management system, or the hosting service.  Let’s look at each one.

User’s device

Most commonly, for whatever reason, the browser cache didn’t update properly.  In this case, the user keeps seeing old content. Clearing the browser cache should easily fix the issue.

For example, if you’re using Microsoft Edge, Google Chrome, or Firefox, you can use the keyboard shortcut CTRL+SHIFT+Del, check the cached/temporary images and file boxes, and click “Clear Now.”

If you’re using Safari and are cool with also deleting your browser history and cookies, click the “History” tab in the upper menu and then “Clear history.”

You can also trick the browser into loading the page fresh by putting a question mark at the end of the URL with some random characters after it.  For example, https://www.launchfm.com?random123.  This will force the browser to load the site as if it’s never seen it before.

The Content Management System

Many WordPress websites use a caching plugin to keep the website loading fast.  There are lots of options out there for these like WPRocket, Litespeed, Hummingbird, and W3 Total Cache. It should only happen sometimes, but occasionally these plugins can backfire and produce cached content longer than they should.  A use case would be seeing your morning show as “On Air Now” during the afternoon show or seeing yesterday’s weather.

To resolve this, the plugin should have a “purge cache” option that should be cleared.  In addition, the website developer should investigate ways to keep the data that needs to be refreshed more often from being cached so heavily.

Web Hosting Cache Issues

This is where changes are made on the website, but the user cannot view them in the browser, even after clearing the browser cache.  This points to a server-side cache issue because the server keeps displaying the cached information.  The server cache must be reset using a plugin’s “purge cache” option.

If you are utilizing a content delivery network, ensure that cache is also cleared each time the website cache is cleared to avoid visitors far away from seeing old information.  If you are using a plugin, they typically account for this and will notify your CDN to refresh its stored information.

Wrapping Up

Caching is a technology that increases the speed of your website.  When used correctly, it will result in significantly faster load times and decrease the load on your server.  Depending on your hosting provider, an increased load on your server could result in higher hosting fees.

If you aren’t already caching your web pages, please look into it immediately.

We want to help your radio station grow and succeed online.  That journey starts with an amazing website that keeps visitors coming back often.  Reach out to us to start your path to online success, or book an appointment to see our tools in action.