title: How can I get Apache gzip compression to work?
body: <p>I can't get my site to use gzip compression.</p>
  
  <p>I recently watched this <a href="http://css-tricks.com/video-screencasts/114-lets-do-simple-stuff-to-make-our-websites-faster/">video</a> by Chris Coyier over at css-tricks.com. In the video, he talks about enabling gzip compression to make websites run faster. </p>
  
  <p>As per his instruction, I linked through to github via html5boilerplate.com, copied the gzip compression code from their .htaccess file, pasted it into my own, and uploaded it to my site.</p>
  
  <p>I've tested it via gzipwtf.com and it doesn't seem to work. Can anyone help me with this?</p>
  
  <p>My .htaccess file looks like this:</p>
  
  <pre><code># ----------------------------------------------------------------------
  # Trim www
  # ----------------------------------------------------------------------
  
  RewriteEngine On
  RewriteCond %{HTTP_HOST} !^orbitprint.com$ [NC]
  RewriteRule ^(.*)$ http://orbitprint.com/$1 [L,R=301]
  
  # ----------------------------------------------------------------------
  # Gzip compression
  # ----------------------------------------------------------------------
  
  &lt;IfModule mod_deflate.c&gt;
  
    # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
    &lt;IfModule mod_setenvif.c&gt;
      &lt;IfModule mod_headers.c&gt;
        SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
        RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
      &lt;/IfModule&gt;
    &lt;/IfModule&gt;
  
    # Compress all output labeled with one of the following MIME-types
    &lt;IfModule mod_filter.c&gt;
      AddOutputFilterByType DEFLATE application/atom+xml \
                                    application/javascript \
                                    application/json \
                                    application/rss+xml \
                                    application/vnd.ms-fontobject \
                                    application/x-font-ttf \
                                    application/xhtml+xml \
                                    application/xml \
                                    font/opentype \
                                    image/svg+xml \
                                    image/x-icon \
                                    text/css \
                                    text/html \
                                    text/plain \
                                    text/x-component \
                                    text/xml
    &lt;/IfModule&gt;
  
  &lt;/IfModule&gt;
  </code></pre>