Categories: Web Hosting

Cache: The cause of, and solution to…

Having problems with your website’s cache? Having cache set up right can drastically improve your website speed as the server just sends static HTML files to the user rather than executing all the scripts that query the database every time.

As a quick tip, just add this line in your .htaccess file to activate browser caching. So once your visitors have loaded your page once, the next time it will be loaded from their local cache on their computer, which is a lot faster!

Header set Cache-Control “max-age=604800, public, must-revalidate”

This will set your pages to cache in the viewers browser for 604800 seconds, or 7 days.

But you can do a lot more than just browser caching. Ideally you want to be caching fully rendered pages as static HTML to avoid excessive database queries, combining your hundreds of JavaScript and CSS stylesheet files into one minified file, and caching database queries and objects on the server side.

What are the best WordPress caching plugins?

Our favourite is W3 Total Cache, We use W3 Total Cache on our own site, recommend it to our clients, and configure it on every website we build with our partners. But you’ll need to spend some time understanding the settings and configuring it to work effectively for your website. Every website is different and you’ll have to spend time configuring the options for object, database and minify particularly.

In the past we used to use WP Super Cache extensively, and we feel it is a bit more user friendly if you are just getting started.  JCH Optimize is also a solid choice for a plugin that just handles combining and minifying your scripts and stylesheets, we used to combine this with WP Super Cache but now W3 Total Cache handles this area too.

 

If you are having issues with your cache let us know and we can help fix it after we switch you over to us.

HostAsean Editor

Our team post tips, tricks and interesting news on the HostAsean blog and like to keep up to date with news from the tech industry and the ASEAN region where we are based. Subscribe for the latest updates or check back regularly.

Share
Published by
HostAsean Editor
Tags: cache

Recent Posts

HTTP vs HTTPS: Risks of not using an SSL certificate on your website

HTTP vs HTTPS and SSL certificates can be a confusing topic. You probably know that…

5 years ago

Free Upgrades to Existing Web Hosting Packages

We have some news for you, we've not just upgraded one of our most popular…

5 years ago

Don’t reinvent the wheel. Why use WordPress instead of coding your own CMS

You shouldn't need much convincing, WordPress is a great tool for a lot of website…

5 years ago

No need to buy SSL certificates – they’re free!

You need an SSL certificate on your website, that’s not up for discussion. But we…

5 years ago

Save the environment – keep your website lightweight and energy efficient

Save the environment one line of code at a time. Improving your website performance benefits…

5 years ago

Troubleshooting common email issues

It’s inevitable, something’s gone wrong – usually just when you need to send that important…

5 years ago