Hacker News new | ask | show | jobs
by the8472 3369 days ago
> 2. compress

No, you don't need to waste CPU cycles on compression for each connection. You can store the .css.gz on the filesystem along with the .css and have the webserver pick up the appropriate file based on Accept-encoding.

That way you can precompress with the slowest compression options.

1 comments

Of course, there are multiple ways to optimize it (like storing stuff at a CDN), but I'm pretty sure 95% of the people do not precompress their assets.