Filed under Web Hosting

Everybody wants to squeeze as much performance of their Web applications as possible. Usually, advanced skills can be required to achieve considerable results although there might a few settings here and there that may try tweaking before hiring an expert.

Enabling Server Compression

This week we’ll begin with server compression. The HTTP protocol supports compression of the data that is sent between the Web server and the browser. Practically all browsers in use support HTTP compression. The compression algorithms work particularly well on text data like HTML, CSS and Javascript.

If you can enable HTTP compression on your Apache Web server, usually that is much simpler solution. It is also more efficient than bothering with keeping minimized versions of all the Javascript libraries that you need.

The mod_deflate module provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network. You can enable this module by editing /etc/httpd/conf/httpd.conf and add the following line:

AddOutputFilterByType DEFLATE text/html text/plain text/xml

Save the configuration file and restart the web server:

 service httpd restart

This will compress only a few file types (html, plain text and xml). Of course you can also compress other file types. I strongly suggest you head over to Apache’s website for more information.

I still got a few optimization tips up my sleeve from which I hope to make a little series of posts so stay tuned for more.


Related Posts

Posted by Stephane on Friday, September 21st, 2007


You can follow any responses to this entry through the magic of "RSS 2.0" and leave a trackback from your own site.

Post A Comment