free geoip CS Tidbits #7: More Compression Options - Jayson's Blog - jaysonKnight.com
jaysonKnight.com
Welcome to my corner of the internet
CS Tidbits #7: More Compression Options

[update] It turns out there is an issue with this mod...Gallery thumbnails are not being displayed.  Only thumbnails are affected, everything else in the Gallery applications displays fine.  I'll have a fix posted shortly. [/update]

I posted earlier about enabling IIS compression to get some great performance benefits from your Community Server site.  Of course not everyone has this option, especially folks who cohost their CS sites.  So I set out to either A) write a CSModule that compresses content, B) write an HttpModule that compresses content or C) find a pre-built library that already does this.  C turned out to be the easiest option as it turns out the good folks over IC#Code have already done this.

First off you'll need to download the source code and samples.  In that archive you'll see a folder called HttpCompressionModule.  If you have Visual Studio you can compile it yourself, if not I've attached a pre-built binary to this post that you can use (NOTE: there is a dependancy on SharpZipLib.dll as well...it's already pre-built in the download archive, but I'm attaching it to this post as well).  Just drop them in your /bin folder and then merge the attached web.config file into your CS web.config and you'll be good to go.

The library supports both gzip and deflate compression, which all major browsers support...deflate uses less server resources, but gzip gets about a 5% compression benefit over deflate (albeit at more resource usage).  I noticed about the same page size decrease on my site as enabling IIS compression, i.e. my main blog page went from around 70kb to under 15kb, which is pretty substantial and leads to much faster pageload times.

Posted Thu, May 18 2006 6:42 PM by Jayson Knight
Filed under:

Comments

Dave Burke wrote re: CS Tidbits #7: More Compression Options
on Thu, May 18 2006 10:36 PM
Your site DOES seem pretty zippy.
Community Server Daily News wrote Community Server Daily News for Friday, May 19, 2006
on Fri, May 19 2006 1:41 PM





We've added a special section to the Friday Daily News, the Week in Review.  Here we'll...
Genyus wrote re: CS Tidbits #7: More Compression Options
on Fri, May 19 2006 10:38 PM
Wow. The moment you get that thumbnail bug resolved, I think I'll be having this one off ya! Nice job!
dsmay wrote re: CS Tidbits #7: More Compression Options
on Sat, May 20 2006 9:19 AM
I have an issue where it messes up the Componenet Art stuff, are you excluding folder in the web config?
Jayson Knight wrote re: CS Tidbits #7: More Compression Options
on Sat, May 20 2006 1:04 PM
DSMay, no that's a bit odd though. What exactly are you seeing?
dsmay wrote re: CS Tidbits #7: More Compression Options
on Sat, May 20 2006 2:07 PM
Maybe its something to do with the skin, I'll try a "stock" install. None of the grids render nor does the post reply in forum. For example in psot reply section in forum I just have post button, title of post but the entire section where message goes is is a rectangle with thin border around it about 1 pixel in height. I also get a bunch of javascript errors in control panel.
Jayson Knight wrote re: CS Tidbits #7: More Compression Options
on Sat, May 20 2006 3:27 PM
dsmay, that very well could be...works pretty well (aside from the thumbnail issue) on a stock installation of CS. A little worrisome though...what browser are you using? I'm going to play around w/ some of the settings on my site (i.e. try gzip instead of deflate, change the compression levels, etc...perhaps the browser isn't decompressing everything correctly...).
dsmay wrote re: CS Tidbits #7: More Compression Options
on Sat, May 20 2006 6:32 PM
I'm using IE7 and FF 1.5.0.3, locally running IIS6 under 2.0 framework. Seems strange my changes would cause an issue, I have wrote some addins but as for the skin it was all style changes. Here an link to reply in FF with compression enabled. I tried gzip and deflate.

http://img.photobucket.com/albums/v206/dsmay/Error.png
Ken.Robertson.Blog wrote Jayson's Birthday
on Wed, May 24 2006 10:40 AM
Thought I'd take a minute to give a quick happy birthday wish to Jayson Knight, one of the CS MVPs. ...
Community Server Bits wrote His site
on Mon, Mar 12 2007 10:25 AM

Jayson Knight has been an long-time advocate of IIS Compression. If you go to his site , you'll probably

Add a Comment

(optional)  
(optional)
(required)  
Remember Me?

Copyright © :: JaysonKnight.com
External Content © :: Respective Authors

Terms of Service/Privacy Policy