3 ms·
What is wrong with compressing static files?
by bluetech 12y ago
What is wrong with compressing static files?
- falcolas 12y agoThat's a good question. Though a better question might be "why not serve pre-compressed static files alongside regular files?" Compression will change your server from being network throttled to being CPU throttled. And in this day and age, we can scale CPUs more easily than we can bandwidth.
- bluetech 12y agoPre-compressing is possible, but why shouldn't the http server do it for you? The server can cache the compressed files in memory and/or disk as it sees fit (although gzip was pretty cheap last time I checked). It can also deal with cache invalidation better than humans - I speak from experience :).
- falcolas 12y agoVery true. The difference lay in the benefit of not having to implement the compression logic as part of the server, making the server implementation much simpler.
- MichaelGG 12y agoAnd it's funny, Windows/IIS makes you install dynamic compression separately, in the name of security. (Course, they also make you install the tftp client separately, under the same "reasoning".)