Pages

Sunday, January 29, 2012

How to make joomla site load fast

Compressing Web pages with GZIP

Compression is a quick and efficient way to save your server bandwidth and speed up your website load time. By adding a piece of PHP code to the top of your Joomla generated Web pages, you can instruct the Web server to compress files for transit to your visitors' Web browser. This is especially useful for text-heavy Web pages that are over 100K in size.

To Optimize Your Joomla Site with GZIP Compression

Note: make sure you have GZIP Page Compression turned on in Joomla Global Configuration>>Server
Go to Extension >>Templates Manager
Open your default template and click on Edit Html button

Add the following code to the very top and above the DOCTYPE:

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>

Done.



This will decrease website load time significantly for sites that are larger than 100k. For sites that are less than 100k in size, it may not have too much affect on page load time.

No comments:

Post a Comment

Thank you for your Comment....