Our Blog

A blog by InetSolution about programming, security, design and marketing for banks, credit unions and e-commerce.

Three Types of Caching that Affect Website Content

When handling support requests at InetSolution, I often do battle with caching mechanisms designed to improve website speed and to mitigate the risks of distributed denial of service (DDoS) attacks. The client who has submitted a support case sees one version of a web page or graphic, their external website visitors see something else, and I may even see something different. When external visitors see website content that doesn't contain the most recent updates, it is usually the result of caching either at the CMS level, the web server level, or the web browser level.

CMS Caching

When your CMS is serving an older, cached copy of your content.

caching example 1

We build and host websites on many platforms, including WordPress, Kentico, and other flavors of content management platforms. All of the CMSs we host use have built-in (or plug-in based) caching to reduce server load and make pages load faster for visitors.

When a content manager makes a change to a page, ideally the CMS caching mechanism should be configured to automatically clear the CMS cache and immediately start serving the updated content. Having said that, this behavior is typically dependent on configuration settings within the CMS or plugin, so it is not uncommon for these cache clearing mechanisms fail to instantly refresh their caches, which results in external website visitors still seeing the old, cached content until the next regularly scheduled cache refresh occurs.

Since generally set the CMS to regularly clear the cache every 30 to 60 minutes, without manual cache clearing intervention by a system administrator, it could take up to a hour for the CMS cache to refresh. Unfortunately, the CMS cache is only one caching mechanism that can result in website visitors seeing out of date content.

Server-side Caching

When the server(s) between (and including the one that hosts your) website are serving an older, cached copy of your content.

caching example 2

What many people do not realize is that well-protected websites actually have multiple layers or "servers" between the web browser and the web hosting server. One of the most common components in the a secure web hosting setup today is a caching proxy server, many of which are designed to help mitigate DDoS attacks or to simply improve the speed of the website. Two popular proxy services, Cloudflare and Sucuri, by default serve a cached version of your website to reduce dramatically improve the speed of websites, which improves customer experience.

These caching proxy servers try to detect content updates and clear their caches automatically, but they sometimes will store certain data, such as graphics, JavaScript, CSS, and similar static data for predefined expiration periods. When this occurs, the cache must be manually cleared for changes to become immediately available. Usually only system administrators have access to these types of proxy servers to perform manual cache clearing.

At InetSolution, whenever possible we build automated processes within our CMS deployments that clear this type of caching when content changes to minimize the time it takes to clear the proxy server caches, but not all CMS caching mechanisms support this kind of automated integration.

Caching like this could take hours or even days to resolve itself and can be the most frustrating to both content managers and hosting system administrators.

Browser Caching

When your own web browser loads a cached copy of your content.

caching example 3

Pages, JavaScript, cascading style sheets (CSS), images, PDFs, and other documents are all normally cached on your devices hard drive by your web browser. Your browser will try and load as little as possible from the server to make surfing the web seem faster. If it notices you have a file in your browser cache that’s named the same and a similar, if not the exact same, size, it will skip requesting a fresh copy from the web server and load the one it has locally. This can cause visual changes (CSS and images), functionality (JavaScript), and even documents to appear as if they haven’t been updated.

There are a few methods to help clear your local browser cache.

  1. You may try opening a new Incognito or Private window for your browser and loading the site there. This isn’t always foolproof however and cached content has still appeared in our experience.
  2. You can turn on Developer Tools in your browser which can give you some control over disabling caching entirely. This is usually too advanced for some of our clients or potentially your customers or members.
  3. Holding shift and clicking the refresh button (several times) seems to be a silver bullet that most people can figure out – and it works the vast majority of the time!

Hopefully these descriptions give you a better understanding of caching to help you identify where the issue lies, to better initiate support, and get your website displaying as intended quickly.

Find this useful?

Want to receive our monthly tip to make your website easier to use and safer? No spam, just good advice. Signup!

Interests

Blog RSS Feed

Request a Consultation

Let us help you accomplish big goals.