Powered by Blogger.
Monday, March 4, 2013

Enabling Gzip compression using .htaccess file in joomla website

Hello All, Everyone wants to make their website fast. By default Joomla websites are little slow. So we always need to do several things to optimize it. One good optimization trick is enabling Gzip compression. There is built in option in Joomla to enable Gzip Page Compression in Joomla  Yet i don't know most of people do not use this awesome feature. If you want to make your Joomla website fast. You need to enable this for sure.

This screenshot will make you clear about how you can do this
You just need to make it "yes"

Now there is another way to enable gzip compression in your website. You can do it using .htaccess file. and i think that works better for me in several occasions. 
Simply add the codes into your joomla websites .htaccess file.


# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Or, compress certain file types by extension:

SetOutputFilter DEFLATE



and you are done. Yes !  it will make your site faster than before. Don't believe me. Check your site using GTMetrix.com . Enjoy