IIS 7 compression does not work

I have a Windows 2008 R2 server with IIS 7.

By default, compression is enabled when creating a site in IIS. I checked the compression module and both checkboxes are checked.

Now I use a violinist to check if the pages are compressed, but it seems that they are not like "No compression", and the page size exceeds 100 KB.

Why aren't pages compressed even though compression is enabled in IIS 7?

Any suggestions would be highly appreciated.

Thanks.

+6
source share
3 answers

I came up with a solution :-) This ALWAYS solution serves as a compressed version.

For me too, in IIS 7.5 Manager, I checked both blocks to compress both:

  • Static files
  • Dynamic files

Sometimes (the first time the web page is served), it is NOT MESSAGED. Then, only the second time, it is COMPRESSED.

The following solution comes from here: http://www.codeproject.com/Articles/242133/Making-the-most-out-of-IIS-compression-Part-conf

For IIS in ALWAYS to cache the compressed version rather than the uncompressed version, modify the applicationHost.config file. You will usually find this file in the C: \ Windows \ System32 \ inetsrv \ config folder:

  • Make a backup of applicationHost.config.
  • Open applicationHost.config with a text editor, or - In IIS Manager, go to the default website> Configuration Editor and go to " system.webServer / urlCompression "
  • Find the section.
  • Add the attribute dynamicCompressionBeforeCache = "true" to the urlCompression element,
  • Collapse | Copy code
  • Save file applicationHost.config
  • IIS Reset server for new attribute to take effect
  • Launch IIS Manager, click the server at the top of the tree and click Restart on the right.

Hope this saves your day since it saved mine!

+4
source share

Is the content of your pages dynamic (i.e. .aspx or .php)? If so, does your IIS have a dynamic content compression module installed? You can tell by looking at the "Enable dynamic content compression" checkbox. If it is inactive, then it is not installed.

To install it, refer to the following link:

Enabling Dynamic HTTP Compression in IIS7 in Windows Server 2008

Essentially, it says (with lots of images) that you must add the dynamic content compression role service through the server manager, and then make sure that it is enabled in IIS Manager.

+14
source share

We ran into the same issue, but with IIS8. Disabling dynamic and static compression did the trick, but after changing the setting you will have to restart IIS.

+1
source share

All Articles