First thing is to [b]cache static content[/b] so that it can be loaded from visitor\’s computer and not from server on every visit. Caching will also decrease bandwidth. It\’s good to set expire tag for at least a year.

Every picture sent by a server include [b]ETag[/b] by which browser can check if a picture from a server match picture from browser\’s cache. This is not needed on static content, which will never change (for example, uploaded pictures).

And don\’t forget about [b]compressing content[/b]. Loading will be faster because a browser needs to download a compressed file which is smaller and it will save a little bit of bandwidth. Compression is good for static and also dynamic content (.htm/.html/.css/.js/.php).[b][/b]

<FilesMatch “\\.(js|css)$”>
SetOutputFilter DEFLATE
</FilesMatch>[/quote]
You need to put this file in a root directory of your website. Be careful, file doesn\’t have any name, only extension “htaccess”. If you\’re using nice/SEO URLs then there is a good chance of you having this file already in a root directory. Only thing you need to do is to open existing file and copy this example code on the bottom of the file. It will only work with Apache HTTPD Server (most popular http server).

[b]Compressing dynamic PHP file[/b]

To compress PHP file you need to add following code on the top of the file:
<?php
ob_start(“ob_gzhandler”);
?>

Or a bit safer method, that will turn off GZIP compression if visitor\’s web browser doesn\’t support it:
<?php
if(!ob_start(“ob_gzhandler”)) ob_start();
?>

You can check [b]site\’s performance[/b] with YSlow add-on for Firefox\’s developer plugin named Firebug.
Download: [url=http://developer.yahoo.com/yslow/]http://developer.yahoo.com/yslow/[/url]