title: Cannot gzip compress static files in Nodejs
body: <p>Gzipping static files does not work as required (as I think). I used <code>gzippo</code> and <code>express.compress()</code>. Both gzipp the files one time. There is no <code>Content-Encoding:gzip</code> if I refresh the page again.</p>
  
  <p>Her is how I setup my express app:</p>
  
  <pre><code>    var gzippo = require('gzippo');
      var express = require('express');
      var app = express();
      app.use(express.compress());
      app.use(app.router);
  
      app.use(gzippo.staticGzip(__dirname + '/www'));
  </code></pre>
  
  <p>This is what Chrome network Response Headers show after page update:</p>
  
  <p><strong>EDITED</strong> for full request headers</p>
  
  <pre><code>    GET / HTTP/1.1
      Host: myhost.com
      Connection: keep-alive
      Cache-Control: max-age=0
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/ *;q=0.8
      User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
      Accept-Encoding: gzip,deflate,sdch
      Accept-Language: en-US,en;q=0.8
      Cookie: __utma=161759779.498387976.1381482631.1394444924.1394395346.80; __utmb=161759779.3.10.1394395346; __utmc=161759779; __utmz=161759779.1394444924.79.7.utmcsr=gtmetrix.com|utmccn=(referral)|utmcmd=referral|utmcct=/reports/myhost.com/5iXAs1ej/retest
      If-None-Match: "25020-1394452200000"
      If-Modified-Since: Mon, 10 Mar 2014 11:50:00 GMT
  </code></pre>
  
  <p>If I refresh again it shows: <strong>Edited</strong> with full response headers.</p>
  
  <pre><code>    HTTP/1.1 304 Not Modified
      x-powered-by: Express
      accept-ranges: bytes
      etag: "25020-1394452200000"
      date: Mon, 10 Mar 2014 10:51:45 GMT
      cache-control: public, max-age=0
      last-modified: Mon, 10 Mar 2014 11:50:00 GMT
  </code></pre>
  
  <p>If I edit the page again I get <code>Content-Encoding:gzip</code> but only one time.
  I don't know if there is something wrong with my express setup.</p>
  
  <p><strong>NOTE:</strong> I serve my page as: <code>res.sendfile(__dirname + '/www/index.html');</code></p>