Leverage browser caching for Joomla

Enable Leverage browser caching for Joomla websites

If you use firebug with either the pagespeed or Yslow plugin, you'll be familiar with the persistantly red, top warning of 'Leverage browser caching' ('Add Expires Headers' with Yslow)

This can be quite simple to fix by adding the following lines at the bottom of your .htaccess file.

<IfModule mod_headers.c>
Header unset ETag
Header unset Last-Modified
</IfModule>
FileETag None
<FilesMatch "\.(ico|gz|JPG|jpg|jpeg|png|gif|js|css|swf)$">
Header unset Cache-control
Header set Expires "access plus 1 month"
</FilesMatch>

This will remove the header for 'last modified' and 'etag' and set a header expiration for other filetypes. It might be that you have to have mod_expires insalled on your server.

Should get you a few bonus points with page speed!

Another good speed tip is to load mootools directly from google

and Stopping mootools from loading

and gzip files through .htaccess

Category: Joomla

Newsletter Signup

Latest Posts

Google+ Timeline Feed for your Website Google+ Timeline Feed for your Website 2012-05-11 - I was asked earlier today to create a Google+ widget for a website to replace a twitt... More detail
Run Facebook Messenger on Windows Vista Run Facebook Messenger on Windows Vista 2012-04-19 - Facebook has just released it's new messenger for windows but it only runs on Windo... More detail
Translate K2store Product Attributes with Joomfish Translate K2store Product Attributes with Joomfish 2011-11-03 - If you have a K2store and your site is in multiple languages, you might have found th... More detail
French Translations for K2store French Translations for K2store 2011-11-02 - I have been working recently with the K2 component/plugin K2store. As a simple sho... More detail
How I Upgraded to Joomla 1.7 How I Upgraded to Joomla 1.7 2011-09-25 - Inspired by Robert Vining over at www.joomstew.com and the fact that I am building mo... More detail

Twitter Stuff