This is a mirror of official site: http://jasper-net.blogspot.com/

Built-in GZip/Deflate Compression on IIS 7.x

| Sunday, May 8, 2011
IIS 7 improves internal compression functionality dramatically making it much easier than previous versions to take advantage of compression that’s built-in to the Web server. IIS 7 also supports dynamic compression which allows automatic compression of content created in your own applications (ASP.NET or otherwise!). The scheme is based on content-type sniffing and so it works with any kind of Web application framework.

While static compression on IIS 7 is super easy to set up and turned on by default for most text content (text/*, which includes HTML and CSS, as well as for JavaScript, Atom, XAML, XML), setting up dynamic compression is a bit more involved, mostly because the various default compression settings are set in multiple places down the IIS –> ASP.NET hierarchy.

Let’s take a look at each of the two approaches available:

Static Compression 
Compresses static content from the hard disk. IIS can cache this content by compressing the file once and storing the compressed file on disk and serving the compressed alias whenever static content is requested and it hasn’t changed. The overhead for this is minimal and should be aggressively enabled. 
Dynamic Compression 
Works against application generated output from applications like your ASP.NET apps. Unlike static content, dynamic content must be compressed every time a page that requests it regenerates its content. As such dynamic compression has a much bigger impact than static caching. 
How Compression is configured
Compression in IIS 7.x  is configured with two .config file elements in the <system.WebServer> space. The elements can be set anywhere in the IIS/ASP.NET configuration pipeline all the way from ApplicationHost.config down to the local web.config file. The following is from the the default setting in ApplicationHost.config (in the %windir%\System32\inetsrv\config forlder) on IIS 7.5 with a couple of small adjustments (added json output and enabled dynamic compression):

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    
    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
      <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="9" />
      <dynamicTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="application/json" enabled="true" />
        <add mimeType="*/*" enabled="false" />
      </dynamicTypes>
      <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="application/atom+xml" enabled="true" />
        <add mimeType="application/xaml+xml" enabled="true" />
        <add mimeType="*/*" enabled="false" />
      </staticTypes>
    </httpCompression>

Read more: Rick Strahl

Posted via email from Jasper-net

43 comments:

Anonymous said...

Hello, I'm Tawanna and I've just recently started to
get involved with what you're posting about. I am not certain where you’re obtaining your facts, but great job anyway. I really should invest some time learning and understanding more. Thanks for the post: I was looking for this info for my search.

My site - trade show pop up booths

Anonymous said...

Hey! Quick question that's completely off topic. Do you know how to make your site mobile friendly? My site looks weird when viewing from my iphone4. I'm trying
to find a theme or plugin that might be able
to correct this problem. If you have any suggestions, please share.

Cheers!

Here is my page Abercrombie Bruxelles

Anonymous said...

Thank you for the auspicious writeup. It actually was once a entertainment
account it. Look complex to more delivered agreeable from
you! However, how can we keep up a correspondence?

Also visit my page: Sidney Crosby Black Jersey

Anonymous said...

Very shortly this site will be famous among
all blogging people, due to it's nice posts

Feel free to surf to my web-site - NFL Jerseys Cheap

Anonymous said...

Hey there! This is my first visit to your blog!
We are a group of volunteers and starting a new initiative
in a community in the same niche. Your blog provided us useful information to work on.
You have done a marvellous job!

My blog: Click This Link

Anonymous said...

Hello! Do you know if they make any plugins to protect against hackers?
I'm kinda paranoid about losing everything I've worked hard on.
Any suggestions?

My weblog: Borse Gucci Ufficiale

Anonymous said...

It's difficult to find well-informed people on this subject, but you seem like you know what you're talking about!
Thanks

Here is my webpage: Gucci Ufficiale

Anonymous said...

Excellent beat ! I would like to apprentice while you amend your website, how could i subscribe for a
blog website? The account aided me a acceptable
deal. I had been a little bit acquainted
of this your broadcast provided bright clear concept

Stop by my web site ... Evgeni Malkin Jersey Authentic Evgeni Malkin Jersey Evgeni Malkin Authentic Jersey Evgeni Malkin Black Jersey Evgeni Malkin Authentic Jersey

Anonymous said...

I was recommended this website via my cousin. I am no longer certain whether this
submit is written by way of him as no one else know such specified about my problem.
You are amazing! Thank you!

Feel free to surf to my page - Chaussure De Foot Pas Cher

Anonymous said...

I am regular reader, how are you everybody? This post posted at this web
site is in fact pleasant.

My web blog Louis Vuitton Handbags

Anonymous said...

Hi terrific website! Does running a blog similar to this require a massive
amount work? I have virtually no knowledge of computer programming however I had been hoping to start my own blog
in the near future. Anyways, should you have any recommendations or techniques for new blog owners please share.
I know this is off topic nevertheless I just needed to
ask. Thank you!

Here is my homepage: Air Jordan

Anonymous said...

Thank you for any other informative website. The place else could I get that
kind of information written in such an ideal means?
I've a venture that I'm just now operating on, and I have been
at the look out for such info.

Here is my blog - Air Jordan Femme

Anonymous said...

I enjoy reading through a post that will make people think.
Also, many thanks for permitting me to comment!

Check out my web blog - Mario Lemieux Black Jersey

Anonymous said...

Amazing! This blog looks just like my old one! It's on a totally different topic but it has pretty much the same layout and design. Excellent choice of colors!

My web-site; continue reading

Anonymous said...

Excellent blog! Do you have any recommendations for aspiring
writers? I'm planning to start my own website soon but I'm a little lost on everything.
Would you suggest starting with a free platform
like Wordpress or go for a paid option? There are so many choices
out there that I'm totally overwhelmed .. Any tips? Thank you!

my weblog ... Cheap Louis Vuitton Handbags

Anonymous said...

You are so interesting! I do not suppose I've truly read something like that before. So great to find someone with unique thoughts on this subject. Seriously.. thanks for starting this up. This website is something that is needed on the web, someone with a little originality!

Look at my website :: http://slc-wireless.com

Anonymous said...

This text is priceless. Where can I find out more?

My site ... Solde Air Jordan

Anonymous said...

Hello mates, fastidious paragraph and nice arguments commented here,
I am actually enjoying by these.

Feel free to surf to my web page ... Recommended Reading

Anonymous said...

Superb site you have here but I was wondering if you knew of any message boards that cover the same topics
discussed here? I'd really like to be a part of community where I can get feed-back from other knowledgeable people that share the same interest. If you have any recommendations, please let me know. Appreciate it!

My web blog Source

Anonymous said...

Admiring the hard work you put into your website and in depth information you present.
It's great to come across a blog every once in a while that isn't the same unwanted
rehashed material. Great read! I've saved your site and I'm including your RSS feeds
to my Google account.

Anonymous said...

Hi! This post could not be written any better! Reading this post reminds me of my previous
room mate! He always kept chatting about this. I will forward this article to him.
Fairly certain he will have a good read. Many thanks for sharing!


my site - Visit Website

Anonymous said...

Hi there, I enjoy reading all of your article post.

I like to write a little comment to support you.

My web page: Full Report

Anonymous said...

Great post! We are linking to this particularly great content on our
site. Keep up the good writing.

Here is my blog post: Going Here

Anonymous said...

Incredible! This blog looks exactly like my old one! It's on a entirely different topic but it has pretty much the same page layout and design. Excellent choice of colors!

My homepage: Read Full Article

Anonymous said...

I'm gone to say to my little brother, that he should also pay a visit this webpage on regular basis to take updated from most recent reports.

my site ... next page

Anonymous said...

Hello! I know this is kind of off topic but I was wondering
which blog platform are you using for this website?

I'm getting tired of Wordpress because I've had
issues with hackers and I'm looking at alternatives for another platform. I would be fantastic if you could point me in the direction of a good platform.

Here is my web blog: Michael Kors Bags - -

Anonymous said...

I am regular reader, how are you everybody?
This piece of writing posted at this web page is genuinely nice.


Look at my weblog: Click Here ()

Anonymous said...

This is the perfect webpage for everyone who really wants to find out about
this topic. You realize a whole lot its almost hard to argue
with you (not that I personally will need to…HaHa).
You definitely put a brand new spin on a topic which has
been written about for years. Wonderful stuff, just wonderful!


My web-site ... continue reading

Anonymous said...

I have read several excellent stuff here. Certainly worth bookmarking for
revisiting. I wonder how much effort you set to make
any such magnificent informative site.

My site :: Air Jordan Pas Cher

Anonymous said...

Fastidious response in return of this question with
real arguments and telling everything about that.



Feel free to surf to my web site Michael Kors

Anonymous said...

If you wish for to improve your knowledge simply keep
visiting this website and be updated with the latest news update
posted here.

my site; Cheap Jerseys

Anonymous said...

Hi, i think that i saw you visited my blog thus
i came to “return the favor”.I am trying to find things to enhance my website!

I suppose its ok to use some of your ideas!!

Feel free to visit my website; Boutique Air Max

Anonymous said...

After I originally commented I appear to have clicked on the -Notify me when new
comments are added- checkbox and now whenever a comment is added I
get 4 emails with the same comment. Perhaps there is an easy method
you can remove me from that service? Cheers!


Feel free to visit my website Nike Blazers

Anonymous said...

This paragraph is in fact a fastidious one it assists new web users,
who are wishing for blogging.

My webpage - Kobe Bryant Shoes

Anonymous said...

Its like you read my mind! You seem to know so much about this, like
you wrote the book in it or something. I think that you could do with
some pics to drive the message home a bit, but other than that, this is magnificent blog.
An excellent read. I will certainly be back.

Here is my web site; Air Jordan Pas Cher

Anonymous said...

You actually make it seem so easy with your presentation but I find this matter to
be actually something that I think I would never understand.
It seems too complex and very broad for me. I'm looking forward for your next post, I'll try to get the hang of it!


my site; Chaussure De Foot

Anonymous said...

Cool blog! Is your theme custom made or did you download it from somewhere?
A design like yours with a few simple adjustements would really make my blog
shine. Please let me know where you got your theme.
Kudos

Stop by my web-site :: Sac a main Guess

Anonymous said...

I have learn some good stuff here. Certainly value bookmarking for revisiting.

I surprise how much attempt you set to create one of these magnificent informative site.



Feel free to surf to my webpage; Wholesale Jerseys

Anonymous said...

Hello to every one, it's actually a fastidious for me to pay a quick visit this web site, it includes valuable Information.

My weblog - LeBron James 9 []

Anonymous said...

Why visitors still make use of to read news papers when in this technological world the
whole thing is accessible on net?

Feel free to visit my blog :: Air Max

Anonymous said...

For hottest news you have to visit internet and on internet I found this web page as
a finest website for most recent updates.

Feel free to surf to my web blog ... Sac Louis Vuitton

Anonymous said...

I know this if off topic but I'm looking into starting my own weblog and was curious what all is needed to get setup? I'm assuming having a blog like yours would cost a pretty penny?
I'm not very internet savvy so I'm not 100% certain. Any tips or advice would be
greatly appreciated. Thanks

Feel free to visit my homepage :: Kevin Durant Shoes 2013

Anonymous said...

That is a good tip particularly to those fresh
to the blogosphere. Brief but very precise information… Many thanks for
sharing this one. A must read post!

Here is my webpage Full Report