Cache: The cause of, and solution to... - HostAsean.com

Our Blog

Latest news and updates from HostAsean

Cache: The cause of, and solution to…

Posted by HostAsean Editor on 03 07 2015. in Web Hosting

Cache - the cause of, and solution to, all of life's problems.

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.

Leave a Reply

Your email address will not be published.

HostAsean.com
Website Hosting in Cambodia
sales@hostasean.com