Friday, January 18, 2008

How to tell apache to deliver content in gzip

Add the following code to your .htaccess or to your apache default conf directory (usually /etc/apache2/)

#Turn on Gzip
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary

Make sure its with-in the VirtualHost tag.

Together with bundle-fu which minize your js/css files my site load time performance rose up by 400%.

miracles do happen :)

0 comments:

:popular_tags => [ruby, rails, ruby-on-rails, רובי-און-ריילס, console,,tricks, youtube, links, screeshots, toturials],
:email_me => 'shmuel@ahdut.com',
:subscribe_to_rss => ,
:sites => [pawst.com, urlazy.com],
:sponsored_by =>