Gzip Compression
So today I did a little reading up on using Gzip to compress files served over the web. I kind of already knew it was a good thing, but didn't realize just how good. You can flip it on with very little effort in IIS (it's literally a checkbox) and dramatically cut the transfer size of all text files. Awesome.
So I flipped it on, went to this page, and compared the results (in bytes):
- Tester.aspx: 17329 -> 7151 (59% reduction)
- Base.css: 3785 -> 1550 (59% reduction)
- Tester.css: 8980 -> 2916 (68% reduction)
- Tester.js: 3416 -> 3290 (4% reduction)
This should help keep the site zippy, especially as I start adding async features.
Speaking of, my massive revamp to the tester page is almost done. Just doing some final polishing and bug testing. I think it turned out really cool, and I can't wait to put it out there and see what people think.
Labels: technical
3 Comments:
Those numbers are pretty impressive!
I suppose the ultimate question is how much overhead does IIS impose when gzip/deflating the content, and if larger pages perform better since the overall render time is longer and more noticeable?
Good point.
I did some googling around, and it looks like the perceived speed increase is dependent on the user's connection speed. At higher bandwidths, the time to gzip is more than the time saved during transfer. Makes sense.
I'm not sure how much of an impact caching has on all this.
I guess it's just a trade-off. Less bandwidth, more processing time.
A bit late to the party on this one, but you say in your post "You can flip it on with very little effort in IIS (it's literally a checkbox)"? Are you referring to IIS7 or IIS6 because as far as I knew turning it on in IIS6 was a complete pain and very awkward - if you were talking about IIS6 can you explain how you do it so I can get it turned on for our server at work :) Thanks!
Post a Comment
Subscribe to Post Comments [Atom]
<< Home