As expected Mozilla have released Firefox 3 and made it available for download. You can download the latest browser by going to the Mozilla Website.
First tests have proved positive as EROL 5 works as expected with this browser.
June 18th, 2008
This guide can be used for sites that are not built using EROL 5, but in this case I am using the new EROL 5 business edition for this article.
The following tweaks can only done on a Linux/Apache platform. If you are currently hosting your site using EROL hosting then this these tips will work without too much amendments.
I put together these tips after installing the Yslow! plugin from Yahoo which works within the firebug plugin for firefox. The Yslow! plugin will rate your site/page and provide you with a grade. ‘A’ being the best. It will also tell you were you can improve the page loading speed.
Compress files sent from the web server using Gzip
In most cases the webserver will send your .html, .css and .js files as uncompressed files to the browser. Using Gzip the webserver will compress the files, making them smaller and then send the files at almost a 10th of the original size. There is a downside to this, and this is the time taken for the server to compress the files before sending and the processing time for the browser to uncompress these files when they are received.
It is not recommended to use Gzip on image files such as .jpg, .gif and .png as these are already in compressed format and will not reduce to any smaller size.
To enable this feature in EROL hosting you will need to create a .htaccess file and upload this to the root of your server. You can do this by creating a file in Notepad (I recommend Notepad++) and adding the following lines.
# compress content with type html, text, and css
AddOutputFilterByType DEFLATE text/css text/javascript application/x-javascript
# properly handle requests coming from behind proxies
Header append Vary User-Agent
This will only apply gzip compression to css and javascript.
To activate gzip for the html files you will need to add the following line.
AddType application/x-httpd-php .htm .html
php_value auto_prepend_file /var/www/vhosts/erolhosting.co.uk/httpdocs/begin_gzip.php
php_value auto_append_file /var/www/vhosts/erolhosting.co.uk/httpdocs/end_gzip.php
You will need to replace erolhosting.co.uk with your own domain name. For those not on EROL hosting you will need to contact your hosting provider to find out what your complete path is.
The first line will tell Apache to interpret all html files as php. This means that all EROL files will be parsed by the PHP compiler. This will allow you to embed php code in your EROL 5 store.
Secondly the next two line will stitch two php files to the top and bottom of all html files.
You will need to create these files and upload them to the server.
begin_gzip.php
< ?php
ob_start("ob_gzhandler");
?>
end_gzip.php
< ?php
ob_flush();
?>
Add an expire header for image, javascript and shockwave files
ExpiresActive on
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
ExpiresByType text/js A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType application/x-Shockwave-Flash A2592000
This will set the expires header for the file types above to 1 month from today. This will reduce the number of subsequent http requests after the first visit of a customer. If they return to your site within a month the browser will not request the images files from the server and this will reduce bandwidth and load times.
Summary
I recommend you install Firefox, Firebug and YSlow and check your page load times.
The components sections shows the Total Size and number of http requests when the browser has an empty cache and after the cache has been loaded. In my tests I managed to significantly reduce the file sizes using gzip and also reduce the http requests using the expires header settings.
June 18th, 2008