5 ms·
Hmm, I think this is an example of an unnecessary optimization. After gzipping, minifying a CSS file might cut your website from like 300k to 299k. On the oth
by jeff18 17y ago
Hmm, I think this is an example of an unnecessary optimization. After gzipping, minifying a CSS file might cut your website from like 300k to 299k.
On the other hand, if this guy combined his CSS files into a single file, he would reduce several HTTP requests which would actually provide a noticeable difference.
- olliesaunders 17y agoWhat percentage of a CSS is machine-ignored whitespace? I'm willing to bet it's quite a bit more than 0.003%. Edit: Here's a real world case. HN's news.css is 1779 bytes, 225 of those can be removed, that's 14.3%.
- cwisecarver 17y agoBut after gzipping most of that whitespace will be gone anyway.
- jeff18 17y agoI was talking about the whole page itself -- I hope no one actually has a 300 kilobyte CSS file. ;) My point is that it sounds impressive to say "Hacker News can cut down its CSS file by 14.3%"... however in the real world, shaving 225 bytes off of a single file (actually even less after gzipping) will not improve page-loading by more than a millisecond.