cloudhead/node-static — pull request #34 by dobesv (2011-11-02 05:24:55+00:00)
Title: gzip support and more consistent headers sent to HEAD

This patch includes support for gzip. It will serve up a static .gz file matching the normal uncompressed file, if it finds one. It must be enabled in the options and the user-agent must specify accept-encoding: gzip. It doesn't do any compression on the fly, so there's no performance penalty worth mentioning.

I think this is a good improvement since if you are actually serving up static files using your node server (as opposed to an nginx proxy in front) you should really support compression for those files where possible as it can greatly speed up the browsing experience.

This system is compatible with http://wiki.nginx.org/HttpGzipStaticModule so you have a simple migration path to an nginx front-end if you later decide to offload the work of sending static files.