Joomla Browser Caching

One of the most easy ways to make your Joomla website faster - which involves no effort at all from your side, is to leverage Joomla browser caching. This is one of the high priority tasks recommended by Google to make your website load faster.

 

Essentially, what you are doing is reusing any files which exist on the users machine, without having to download them again. By extending the caching lifetime (or how long a file takes to become old), you are making sure that your visitors do not spend time downloading the same files everytime they visit your website.

This change involves very little changes and is not very complicated.

Change .htaccess to increase Joomla browser cache

To set the expiry time of files such as images and CSS files, this is requires a slight modification to your .htaccess file, which is found in the root of your hosting server. This is done by changing the expire headers.

As a bare minimum you add the following in your .htaccess file. To do this, simply access your hosting CPanel, and with your File Editor, find the .htaccess file and add the following to the bottom of the file. Do not make any other changes.

<IfModule mod_expires.c>
  FileETag MTime Size
  AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType text/html "access plus 600 seconds"
  ExpiresByType application/xhtml+xml "access plus 600 seconds"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType text/javascript "access plus 1 month "
  ExpiresByType application/javascript "access plus 1 month"
  ExpiresByType application/x-javascript "access plus 1 month"
  ExpiresByType image/x-icon "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/gif "access plus 1 year"
</IfModule>

We are setting files which refresh quickly such as the HTML of your site to expire after 600 seconds, whilst we are changing such things as the CSS and Javascript to only expire one a month. This means, that if your visitor visits the site again within a month, they don't need to redownload your CSS and JS files again. If you know that you rarely perform these types of changes on your site - you can see the value higher, to 1 year, similar to the jpeg, png expires header

Set Image files change to a long browser caching expiry

As you can also see in our example above, our image files are set to expire only once a year. This makes sure that the files which take most time to download are kept on the visitors machine, and won't have to be downloaded again next year. Due to this change in your Joomla browser caching - the images are not downloaded again for one whole year. This makes the experience of a returning customer much more positive.

One more thing...

Do you have friends or a Facebook group who you think would find this useful? Share this with them and then let me know what they think.

Want to supercharge your website?

 
Our website loads FAST ... just 1.29 seconds. We're hosted on FAST InMotion VPS servers We want YOUR website to be fast too, so we've gotten you an exclusive deal - 47% OFF for DART Creations friends + FREE domain! Check it out NOW!
 

Translate

who are we?

DART Creations is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run DronesBuy.net - a website for drone hobbyists

David attard

Follow us on Social

         

 

 

 

Popular Content

Joomla extensions to take your website to the NEXT level

Is your Joomla website reaching its full potential? We install many of these extensions on almost ALL of our Joomla sites - why don't you check them out our list of Joomla Extensions and see whether you can take your site to the next level?

Where are we hosted?

This site is proudly powered by FAST VPS InMotion Servers and given an insane speed thanks to MaxCDN!

Web Hosting MaxCDN - Speed up your website

 

InMotion Hosting Review - Recommended Web Hosting servers for business, Joomla, WordPress and ecommerce websites.

InMotion Hosting Review

Advertise on DART-Creations.com

DART Creations is interested in developing partnerships with mutual benefit. If you like the stuff we publish and would like to develop a relationship, we'd be happy to hear from you. Go on - drop us a line - we'd love to hear from you :-)

The Outstanding HunGRYJPEG Bundles

AWESOMENESS! Bundles of premium font + graphic packs at more than 96% OFF!  Get this bundle for just $29 - This month ONLY!

The Hungry JPEG Awesome font bundles

New! DIVI 3.0 WordPress TeMPLATE + PageBuilder - 10% OFF Limited Launch offer

You'll surely create a perfect website with Divi 3.0!

Divi 3