Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.
Note:You can also minify css files
Note: While you should move scripts to the page bottom they should still be before the closing body and html tags.
Combine and minify CSS
The one caveat to this technique is if you have a large css file for a public site with another large css file for an internal application it makes sense to keep those css files seperate as you are probably going to have alot more public visitors to your site who will never need the internal css rules.
Enable gzip Compression
Gzip compression is a process by which the webserver takes a webpage (after the scripting language php/asp/jsp/CF has finished working) and compresses the output into the gzip format. The compressed output is then sent to the client browser which then reverses the compression.
Note: Images do not benefit much from compression, only the html,css and js output really benefit.
On the face of it this seems like alot of work. And yes it does add load both to the server which has to compress the output and to the client to uncompress it. However the payoff comes in two ways.
By compressing the page you can achieve some impressive size reductions. I have seem up to 80 percent compressions. This can drastically reduce bandwidth bills.
Time to recieve vs Time to decompress
Provided that both the server and client machine are not excessively stressed, the time saved by sending a smaller page file over the net will exceed the time required to compress and decompress the file.
Note: Unpatched editions of IE 6 have been noted to have problems with gzip compression. I personally do not worry about people who use unpatched editions of IE 6 nor will I ever. It is not the responsibility of any developer to bend over backwards for stupidity.
Update 15-jan-2011: New blog entry with instructions on enabling gzip compression on IIS 6.
Update 17-jul-2012: New blog entry with instructions on enabling gzip compression on Apache HTTPD.