I have a Windows server 2008 R2 with IIS 7.
By default when you create a site in IIS, Compression is enabled. I checked the Compression module and both Checkboxes are checked.
Now, I am using fiddler to check if pages are being compressed but it seems they are not as the No Compression is selected and the page size is over 100 KB.
Why pages are Not compressing even though Compression is enabled in IIS 7 ?
Any suggestions will be highly appreciated.
Thanks.
Select the Internet Information Services (IIS) Manager under Roles > Web Server (IIS). In the IIS Manager, select the desired Site and open the Compression option (Features View). In the Compression window, mark the check box corresponding to the Enable dynamic content compression option.
On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Performance, and then select Static Content Compression and/or Dynamic Content Compression. Click Next. On the Select features page, click Next. On the Confirm installation selections page, click Install.
IIS Dynamic Compression configuration: Dynamic compression is a feature that allows the IIS web-server to compress responses coming from such handlers as the ASP.net Managed Handler, ISAPI Extensions or CGI handlers that dynamically generate responses for requests they handle.
Are your pages' content dynamic (i.e. .aspx or .php)? If so, does your IIS have the dynamic content compression module installed? You can tell by looking at the "Enable dynamic content compression" checkbox. If it is grayed out, then it is not installed.
To install it, please refer to the following link:
Enabling Dynamic HTTP Compression in IIS7 on Windows Server 2008
Essentially, it says (with lots of pictures) that you must add the Dynamic Content Compression role service through Server Manager, and then ensure that it is enabled in IIS Manager.
I've come to a solution :-) This solution ALWAYS serves a compressed version.
For me too, in IIS 7.5 Manager, I have checked Both boxes, in order to compress both :
Sometimes (the first-time a webpage is served), it is UNCOMPRESSED. 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
In order to get IIS to ALWAYS cache the compressed version, rather than the uncompressed version, modify the applicationHost.config file. You'll normally find this file in the folder C:\Windows\System32\inetsrv\config:
I Hope it will save your day, as it saved mine !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With