GZip compression

Discussion in 'General troubleshooting' started by gunsh, Mar 28, 2010.

  1. I have enabled gzip compression in IIS Manager and tools report that pages still aren't compressed. Is this a dummy-no-effect-setting or is there something else that needs to be set up?

    Thanks!
     
  2. Ray

    Ray

    What exactly are you trying to accomplish? Are you trying to upload a compress file to our server and uncompress it within your root?
     
  3. [feeling like a fool]

    No, I am trying to tell web server to gzip compress its output.
     
  4. Ray

    Ray

  5. Even before opening up this thread I figured out "Compression" module and I enabled "dynamic content compression" there but the output seems to stay uncompressed regarding of this setting.

    I inspected web.config pre and post this change and it differs in true/false as shown below:
    Code:
    <urlCompression doDynamicCompression="true" />
    The link you pointed me to talks about <httpCompression> and this is nowhere to be found in my web.config. The Compression module does not seem to affect it. Am I supposed to add it manually?

    Please advise!
     
  6. Ray

    Ray

    I'm still a little unclear on exactly what you are trying to do. You mentioned..

    ---I am trying to tell web server to gzip compress its output

    I assumed you wanted to try and enhance the performance of your site by compressing the http calls. I now think you want users to download something from your site and they receive it in a compress format. Is that correct? I still need you to be a bit more detailed on exactly what you are trying to accomplish.
     
  7. I am not sure why I sound so confusing...

    You got it the first time. I want to compress HTTP output and thus speed up the browsing experience for the user.

    Now that this is clear, let me reiterate that changing "dynamic content compression" in "Compression" in IIS7 Manager does not achieve the desired effect. HTTP output is still uncompressed.

    Other than this, changing this option emits no <httpCompression> in my web.config. It writes an <urlCompression> instead.

    So my question remains, if I wanted to do HTTP compression what are the exact steps in IIS7 Manager I must take? If this cannot be done in GUI, must I manually edit web.config?

    Hope this all finally makes sense to you. Thanks a lot!
     
  8. Ray

    Ray

    What type of web pages are you trying to compress. It is classic asp or are they .net with aspx extensions?
     
  9. It's ASPX.
     
  10. Ray

    Ray

    With IIS 7, compression is done a little differently then with IIS 6. By going to the Compression module on IIS 7, you are setting the http compression state. If you are using .Net application you will need to turn it on for dynamic content, and for classic asp or html files it will be static content. Bear in mind that these modules you see in IIS 7 are just a representation of the elements with the web.config file. Infact you can set them by directly coding into your web.config.
    If you have multiple web applications and some of the web applications are inside a subdirectory then you will need to make sure you alter the web.config file for that application. If its on the root then the web.config file will be set from the root.

    I'm not quite sure how exactly you are able to tell that the web pages are not being compressed. But the URL should still be the same.

    If you call on (as an example) www.mydomain.com/default.aspx it will still be compressed even if it displays on the URL www.mydomain.com/default.aspx
     
  11. Using Firefox and Page Speed/Fire Bug add-on one can easily troubleshoot various page speed issues. One of them is compression (or lack of). It reports no compression for my site regardless of the setting in Compression IIS7 module.

    Actually, Page Speed reports no compression on either static content (JS, CSS) or dynamic (ASPX).

    I am also aware that one cannot tell if a page is compressed by merely looking at the URL. I was never trying to make this point. I said I was using a "tool". This tool is Page Speed as mentioned above.

    So, to put it all in once again in a single statement... I cannot make HTTP compression work regardless of the Compression IIS7 module setting and this setting does affect web.config but IIS7 is not honoring it.

    I have re-read your last post three times and I could not find any new information I could cling to. Basically, all you said makes sense but it doesn't help. The setting that should obviously do the trick for me - does nothing!
     
  12. Ray

    Ray

    Some times I have seen the elements do not take the changes. Try manually setting the URL compression to false, save it, close the web.config file. Then go back to it and set it again to True, save it, and then close the web.config file.
     
  13. As I said in one of the first posts, I looked at web.config and Compression module really did affect web.config. But just to honor your advice, I tried it again. I even tried switching from true to false and back, manually editing web.config. No change there!

    Then I stumbled upon http://www.iis.net/ConfigReference/system.webServer/urlCompression where I found the following quote:
    Could it be that dynamic compression is not installed on your server so that changing settings has no effect?
     
  14. Ray

    Ray

    I just checked our servers and Dynamic Content Compression is installed on our Windows 2008/IIS 7 servers.
     
  15. Ok, things appear to be working for me now. I am not sure which change did the trick but I am surely not touching anything now.

    Thanks for your help!
     
  16. these discussions are interesting.

    i hope this will solve my question about gzip compression
     

Share This Page