Hacker News new | past | comments | ask | show | jobs | submit login

The content is static, and webservers like nginx support service gzip compressed equivalents if it finds it alongside the uncompressed ones. Might as well do that compression once rather than multiple times. If you're doing it just once, you can also realistically take the extra effort and use zopfli for further (albeit slower) compression.



Most of the major web server software caches the gzipped content. It only happens once.

Plus you can actually look at the files on the server without modification or piping them to gzip to check the files.

You can also elect not to gzip files smaller than MTU (1500 bytes) and stop wasting your and your client's time. Realistically it's often wasteful to gzip small files (below 5KB).

If you're worried about squeezing maximum compression out of your text files, then you're serving up too much stuff to clients anyway. You probably don't care about your users... just about your bloated page loading fast. Get rid of some ad garbage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: