SNA
SNA

Reputation: 7728

IIS compression

Can anyone tell me the use of IIS/HTTP comression in .net web applications. I have iis 6.0 installed in my system.How do i activate compression.

Is it really helps to betetr the performance in real time?

My web page is very slow and one analyzing tool(web page ANlyzer) says to files are not compressed. Please advise.

Upvotes: 6

Views: 829

Answers (7)

lance
lance

Reputation: 16342

I've adapted HTTP Compression Module before to compress pages being served from an IIS instance I didn't manage. Compressing my content ~80%, it was a good match for my situation (spare CPU cycles and slow network to the end user).

Upvotes: 0

nikudesu
nikudesu

Reputation: 238

What problem are you trying to solve? If you are having a bandwith issue, then compression will be helpful. Remember, nothing is free. You may save some bits, but you're trading those bits for CPU time.

Upvotes: 0

Kev
Kev

Reputation: 119806

To activate HTTP compression in IIS 6:

  1. Launch the IIS Management MMC snap-in.
  2. Locate the 'Web Sites' node in the LHS tree pane.
  3. Right click on 'Web Sites' then select 'Properties'.
  4. Click on the Services tab.
  5. Choose the HTTP compression type from the HTTP compression panel.
  6. Click OK.

In IIS 6, setting compression this way (using IIS's own compression mechanism) is all or nothing for all your sites. Check Marc's link to the TechNet article on how to use adsutil to gain more fine grained control over this.

Jeff had an article from way back about his experiences with setting up compression on IIS 6:

HTTP Compression and IIS 6.0 (CodingHorror)

There are third party components by vendors such as 'Port80 Software' that provide more granular control over compression configuration:

Port80 ZipEnable
Port80 HttpZip

Upvotes: 1

I GIVE CRAP ANSWERS
I GIVE CRAP ANSWERS

Reputation: 18869

If your website is slow, use some diagnostic tools on it. Firebug and YSlow are worth examining.

Upvotes: 1

Amr Elgarhy
Amr Elgarhy

Reputation: 68912

Check the IIS resource kit, it will help in compress through IIS

Download

Also you can check this article to learn about how to use it to compress.

Another example

Upvotes: 1

Troy Hunt
Troy Hunt

Reputation: 20387

You need to assess the overhead of compression versus the gain of smaller volumes of data on the wire. In my experience, this has resulted in great gains where the server infrastructure is well specced and the network latency is high. Try using a tool like Fiddler to do some back to back comparisons of total load time from begin request to end response.

There's a great step by step article on how to enable this here.

Upvotes: 0

Marc Gravell
Marc Gravell

Reputation: 1062780

I was tempted to say "belongs on serverfault", but from a development/design/architecture point of view there are some things to know here.

  • yes, http compression can make a big difference to performance if bandwidth (size) is the issue, especially if you are talking to non-local clients - and is worth including in most web applications
  • if your pages are slow because of how the processing at the server works, it won't make any difference at all... it only improves the server -> client measure
  • to enable it, see google - or MSDN
  • it requires a client (browser) that accepts compression (although this is negotiated in the http headers, so it should "fail safe" for old clients)
  • but you need to watch out; if you still support IE 5?6?, there are a number of major bugs here (especially with ajax etc) - test on the clients you expect to see
  • use Fiddler to check that it is working (as a developer, Fiddler should be one of your closest friends...)

Upvotes: 4

Related Questions