- Canada's Leading Web Hosting and Domain Name Provider

Everything You Ever Wanted to Know about Website Caching

If you run any kind of website, you’ve probably encountered the term “caching” and most likely have turned on caching for your website in some way. But do you know how caching actually works?

Your website is written in languages like CSS, PHP, Java, and others. But browsers read and display websites in HTML, so when someone visits your website, these other languages basically need to be converted into HTML for the site to be displayed to your visitor. Caching means that the server remembers the HTML it translated, and next time a person visits, shows them the HTML directly without doing the underlying calculations again. The result: much faster website load times and happy visitors. 

As you can guess, there is a downside here as well: because the HTML that is rendered is a copy, the visitor is technically not getting the most up-to-date version of your site. If you’ve changed something in the interim, they will not see that updated info. But for most websites, this is not a big issue, because information does not change that frequently. The cache can be set to refresh on a certain interval (24 hours, every hour, etc.) or are set to update anytime new content is posted to the site. This ensures that an up-to-date version of your site is being shown to visitors.

Caching isn’t only more efficient when serving websites to one user at a time. Because it lightens the load on the server by reducing the amount of work that needs to be done, caching also makes it easier to handle spikes in traffic your site might get. 

Caching works on two levels—on the server side, it helps website performance. It also works on the visitor’s browser, helping them whenever they revisit your site. Between the two systems, everything works much more smoothly.

If you’re on the WordPress platform, you’re likely familiar with a number of caching plugins that are available. Depending on your hosting solution, you may have caching available there as well. For example, with hosting plans from CanSpace Solutions, our customers get access to Cloudflare, which offers a number of performance-enhancing options, one of which is caching. CanSpace is a CloudFlare premium partner, so our clients get access to all of the tool’s powerful features free of charge.

The cardinal rule here is that you should not have more than one caching feature enabled at a time. So, if you’re using your Cloudflare cache, do not also turn on a caching plugin. You can imagine what happens—you’re making a copy of a copy and that doesn’t increase efficiency, it results in display errors on your site, degrading customer experience. 

If you have any questions about caching, or wondering which of the many caching options would work best for your site, reach out to us today!

CanSpace Team

CanSpace Solutions is Canada's leading domain name registrar and web hosting provider. Keep an eye on our blog for expert information on domain names, websites, and running a business online.