15
August
2011

Enable Mod_Deflate on your website

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. Learn how to enable it through yout .htaccess file.

If you have compiled apache with mod_deflate then you can potentially reduce your bandwidth usage by anything between 50% to 80%. Simply add the code below to your .htaccess file. Once done, you can enter your domain name at whatsmyip.org/http_compression/ to ensure it is working, and to see the bandwidth savings!

# compress the files
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
text/javascript application/x-javascript
# removes some bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\\.0[678] no-gzip
BrowserMatch \\bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

Written on Monday, 15 August 2011 19:09 by Matt Nelson

Viewed 280 times so far.
Like this? Tweet it to your followers!

Rate this article

(1 vote)

Latest articles from Matt Nelson

  • VPS Hosting posted on Friday, 03 December 2010 23:19

    Silverark VPS hosting: cPanel + WHM With your own Virtual Private Server (VPS) you gain…

  • Enable Mod_Deflate on your website posted on Monday, 15 August 2011 19:09

    The mod_deflate module provides the DEFLATE output filter that allows output from your server to…

  • Alter Tubepress Vimeo Thumbnail Resolution posted on Sunday, 03 July 2011 16:55

    There is a great plugin for wordpress called Tubepress. This will basically take any collection…

Latest 'tweets' from Silverark

  • @GJones240 This song has been stuck in my head all morning: When out of work… http://t.co/vA1Pnyds Link Friday, 13 April 2012 13:59
  • Check out "Smarter Cities, Smarter Future" http://t.co/r8z1Ti2D via @SCY. Who is coming with me? Link Friday, 21 October 2011 13:01
  • @Super_Carly It went down at 20:15 and I think it came back up at 20:30. Have you experienced any trouble since? Link Friday, 30 September 2011 09:28
blog comments powered by Disqus

Author: Matt Nelson