Changes to compression in IIS7

Compression module provides IIS the capability to serve compressed responses to compression enabled clients. Clients which can accept compressed responses send Accept-Encoding header indicating compression schemes they can handle. If IIS can compress the response using a compression scheme which client can understand, IIS will send a compressed response with Content-Encoding response header indicating the scheme which was used to compress the response. Read more ...

View the original post

28 Comments

  • Hello,
    This is nice to know, for IIS7 about the compression. But I have one question for this, if you could provide me an answer that would be greate, and I really appriciate that.

    i tried to use http compresion on IIS7, but somehow, i guess that dose not give me any result.
    I tried to access my website using the folllwing webtools.
    http://www.port80software.com/products/zipenable/compresscheck.asp

    which always shows me, Compression Status : notcompress [:(]
    So, i guess something more we need to do httpCompression in IIS7.

    Please look into the following what i wrote in my web.config file.






























    I am awaiting for your reply

  • Chintan,

    Are you sure you wrote httpCompression section properties in web.config? HttpCompression section is defined AppHostOnly in applicationHost.config which prevents you from setting its properties in web.config. Compression module only reads server level properties from applicationHost.config. If you allowed httpCompression section by modifying section definition in applicationHost.config, that might be a problem. See if this is the problem.

    Kanwal

  • When you say "the main thread", do you mean a request thread, or the main IIS service thread?

    One compression thread per app pool, or many?

  • Vlad,

    By main thread, I meant request thread. There is no dedicated thread to do compression in IIS7 and so there can be many threads in a worker process doing compression.

    Kanwal

  • Thank you very much for the information, it is very helpful to understand how much it has changed from IIS 6.0!

  • Javascript won't work on a webpage in iis7 ?


  • I think that removing the various knobs is a mistake. Setting a good default value and leaving the knobs available would be my preference.

    As for:

    HcPriority is removed as scheme to use when multiple ones appear in Accept-Encoding header of request is picked depending on scheme which is appear first in Accept-Encoding header (assuming no q factor). This is as per HTTP specs.

    It may be true that the client can specify a preference, and the preference is in presentation order, but, the server administrator may have a different preference. That is why it is stated as a preference order. And yes, there are good reasons for picking one over the other in specific circumstances.

  • In IIS6, I can add *.jsp as a file type for dynamic content compression.
    For IIS7, I do not need to worry about the file type for dynamic, thery are all enabled, right?
    Thanks,

  • George,
    In IIS7, you can enable/disable compression based on mime-types. So instead of adding *.jsp, you need to enable dynamic compression for its mime-type by editing configuration in system.webServer/httpCompression section under dynamicTypes element. If you want to enable dynamic compression for all mime types, you can allow dynamic compression for */* mime-type. By default, dynamic compression is enabled for text/* and message/* mimetypes and not for all (mime-type */* has enabled="false").
    Kanwal

  • Mike,
    I am not sure why you think that javascript won't work on a webpage in IIS7. Javascript will work just fine on IIS7. Javascript is just another file and we send it across on http. Its http clients responsibility to request the files and interpret them all correctly.
    Kanwal

  • Spenser,
    Other than HcPriority and HcFilesDeletedPerDiskFree , other knobs were deleted because they pretty much don't make any sense given the design changes. I agree than scheme priority can be useful in some cases but we choose to stay compliant with http specs instead.
    Kanwal


  • Astroloji, günlük burçlar, burç uyumları, yükselen burçlar, aşk ölçer, haftalık burçlar, aylık burçlar, aşk falı testi, burç uyumu.

  • Danke

  • Javascript won't work on a webpage in iis7 ?

  • Hi carsamba,

    Javascript will work perfectly in IIS7. I am not sure why you got the impression that javascript won't work.

    Kanwal

  • hi ;
    We have a very busy server and IIS Compression disables mostly in daytime. We want it to be open what ever it costs. Because of not being want to consuma that much bandwith.

    We even did make
    dynamicCompressionDisableCpuUsage="99" dynamicCompressionEnableCpuUsage="1">
    But how can I complettly shut of the disabling system ?

    Thank you very much

  • Hi gunok,

    There is no separate knob to completely shutoff the disabling system. If you change dynamicCompressionDisableCpuUsage and staticCompressionDisableCpuUsage to 100, that will effectively turn this system off because cpu usage will never be more than 100%. I don't think you need to set dynamicCompressionEnableCpuUsage and staticCompressionEnableCpuUsage but you can set them to 99/100 telling the system to enable it back if usage falls below 99%/100%.

    Thanks,
    Kj

  • Have you seen an situation where event ID 2264 is logged hourly?

    "The directory specified for caching compressed content C:\inetpub\temp\IIS Temporary Compressed Files\DefaultAppPool is invalid. Static compression is being disabled"

    can you explain how this might be related to any changes in IIS7?

  • Hi,

    I read that IIS6 does not support inbound HTTP compression. Is is true and is there a chance that inbound compression is supported by IIS7?

    Best regards,
    Yves Van Dooren.

  • Hi Yves Van Dooren,

    Yes, its true that IIS6 doesn't support inbound http compression and same is true for IIS7. I am not aware of any plans to support that in next release as well. I will follow-up on this request in the team so that we can evaluate doing this in a future release.

    Thanks,
    Kanwal

  • Kanwal,

    Is it reasonable to hope for whitespace compression and normalization (i.e. minify http://code.google.com/p/minify/) in new releases of iis? There is 3rd party software that can do this through ISAPI filters for IIS5/6.

    We've been 10-15% improvements in bandwidth from minifying on our clusters.

    Eugene

  • Hi Eugene,

    Right now this is not planned for next release of IIS7. I am going to follow up in the team and see if we should do something similar in compression module. I will reply again when there is a decision on this.

    Thanks for suggesting this feature.
    Kanwal

  • Thanks for this fresh information; I was looking for a convenient place for compressing heavy video file. Besides these, I have found another place to compress and decompress all sorts of files. That is www.krunchit.net where you can zip or unzip ten files online altogether.

  • Thanks for this fresh information; I was looking for a convenient place for compressing heavy video file. Besides these, I have found another place to compress and decompress all sorts of files. That is http://www.krunchit.net where you can zip or unzip ten files online altogether.

  • I think what people are getting at when they say it doesn't work with Javascript is that by default the applicationHost.config has the following line in the static HTMLCompression section:



    However in the same document IIS is configured to give .js files to the mimeType "application/x-javascript", so js files will not be zipped by default. Adding the following line gets it all working.



    Hope this saves someone else a little time

  • A Better HTTP Compression Solution

    Here is a better solution that works with JavaScript and also compatible and with AJAX enabled content: http://MicroMighty.com/Components/HTTP_Compression_Module.aspx

    This HTTP Compression module uses configureable MIME types and other features that are not being offered by any other http compression software, it is also being configured through the Web.config and not on IIS,

    See how flexible it can be: http://MicroMighty.com/SDK/HTTPCompressionModule/HTTPCompressionModule.aspx

  • Hi Avinash,

    By “you don’t have access to IIS”, I understand you don’t have administrator access to IIS and can only change configuration in web.config. Is this correct?
    If yes, then no you can’t enable compression for “.config” files. Only administrator can enable compression for “.config” files by adding that to httpCompression/staticTypes list. You can only control if you want to enable or disable compression completely by setting urlCompression/doStaticCompression property.

    Thanks,
    Kanwal

  • A stupid question perhaps, but hasn't compression always been a part of the http standard (1.1).

    "The web client includes an Accept-Encoding field in the HTTP request, with supported compression schema names (called content-coding tokens), separated by commas.

    GET /encrypted-area HTTP/1.1
    Host: www.example.com
    Accept-Encoding: gzip, deflate"

    I mean, if the client tells the webserver it supports gzip compression then the webserver is free to (and should if it can) compress the traffic using gzip. Is this not automagically supported by the CF framework, and has this not been supported by IIS until IIS7 or what?

    (http://en.wikipedia.org/wiki/HTTP_compression)

    Regards
    Kai

Comments have been disabled for this content.