Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>what if the client browser doesn't support gzip (in rare case)? will it automatically send the uncompress version?</p> </blockquote> <p>According to this line:</p> <p><a href="https://github.com/tomgallacher/gzippo/blob/master/lib/staticGzip.js#L121" rel="nofollow">https://github.com/tomgallacher/gzippo/blob/master/lib/staticGzip.js#L121</a>:</p> <pre><code>if (!~acceptEncoding.indexOf('gzip')) { return pass(filename); } </code></pre> <p>It will send uncompressed file.</p> <blockquote> <p>also, will the zipped file cached? or compress for every request?</p> </blockquote> <pre><code>//This is storing in memory for the moment, need to think what the best way to do this. </code></pre> <p>I read this in comment so I assume right now it stores gzipped file in memory. But even more important it also uses client side caching.</p> <blockquote> <p>If the app's get method returns JSON, what is the correct method to handle compress result? should I first check the http.request header's "accept-encoding" and make sure it support gzip, then compress the JSON result? or gzippo will automatically handle it?</p> </blockquote> <p>I think you stand correct. I don't believe Gzippo will handle other routes, but only static folder.</p> <hr> <p>Some other tips:</p> <ul> <li>You should combine all your js/css when deploying => <a href="http://developer.yahoo.com/performance/rules.html#num_http" rel="nofollow">http://developer.yahoo.com/performance/rules.html#num_http</a>. I don't believe gzippo does this already.</li> <li>You should consider a CDN for better performance.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload