cloudhead / node-static

rfc 2616 compliant HTTP static-file server module, with built-in caching.
MIT License
2.18k stars 245 forks source link

gzip #27

Open tester9989 opened 12 years ago

tester9989 commented 12 years ago

I added gzip support in .htaccess, but I still couldn't make it work. Is there any way to serve Gzip files using node-static?

ref : "AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript"

cimnine commented 12 years ago

.htaccess is for apache, not for node.js, nor for node-static. You would have to implement gzip compression in node-static. Or find someone who does it for you. Maybe you could compress the data after calling node-static with one of those node compression libraries available. Tell us if your were successful.

PS: Read this Issue Report about GZIP compression: https://github.com/cloudhead/node-static/issues/20