Customize your Browser Caching for Faster Performance

In the race to the top of Search Engine result pages - ultimately higher SERP (Search Engine Ranking Points) the site speed is an important factor. There are lots of tricks to increase a Joomla site's speed, here is one wich does not need additional code to be installed and executed, but yet is powerful an let you fine-tune your site's performance.

Enter the Browser Caching arena. No, is not new or revolutionary, it's there for long - and often overlooked. Better, the best Joomla fine-tuning tools are ignoring it, or have a simple switch to turn it on or off, you basically can't fine-tune it. But it's a powerhouse, and you should fine-tune it. Don’t get surprised: you can very easily assign different cache times for your visitor's browsers for different kind of files composing your page. And this is the honey-pot all other optimization tactics are missing. There are parts of the site which can be very persistent, but there can be others, which need to be frequently updated.

So go ahead, and boost your site's performance by simply adding the code below to your .htaccess file. Feel free to alter the code to change the cache timing of files until you match your site's specifics. For example if you have a site with imagery which is frequently updated, you might want to set the settings for images to a lower value. same is applying if you use some trickery which outputs updated Java Script files based on user actions. In contrary, if you have a static content, a brochure type of site, you might want to increase the cache time for your textual content.

 

ExpiresActive On
ExpiresByType text/html  "access plus 1 seconds"
ExpiresByType image/gif  "access plus 1 years"
ExpiresByType image/jpeg  "access plus 1 months"
ExpiresByType image/png  "access plus 1 months"
ExpiresByType text/css "access plus 1 months"
ExpiresByType text/javascript  "access plus 1 months"
ExpiresByType application/x-javascript  "access plus 1 months"
ExpiresByType image/ico  "access plus 1 months"

Happy tweaking! Test every change you made, you can end up by ruining your users experience, instead of making them happy! Find you specific honey-pot!