Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable GZIP compression in IIS 7.5

I want to compress my files using GZIP. Can you share the web.config code for compressing files with GZIP?

Is there anything more that I have to do after uploading my web.config file?

like image 920
chaitali gupta Avatar asked Aug 30 '14 07:08

chaitali gupta


People also ask

How do I enable gzip compression?

It's also one of the two recommended web servers by WordPress. To enable GZIP compression on Apache servers, you need to use its mod_filter and mod_deflate modules and configure them properly with the right directives. They will direct Apache to compress server output before sending it to clients over the network.

How do I enable dynamic content compression in IIS 7?

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.

How do I enable text compression on IIS?

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.


1 Answers

GZip Compression can be enabled directly through IIS.

First, open up IIS,

go to the website you are hoping to tweak and hit the Compression page. If Gzip is not installed, you will see something like the following:

iis-gzip

“The dynamic content compression module is not installed.” We should fix this. So we go to the “Turn Windows features on or off” and select “Dynamic Content Compression” and click the OK button.

Now if we go back to IIS, we should see that the compression page has changed. At this point we need to make sure the dynamic compression checkbox is checked and we’re good to go. Compression is enabled and our dynamic content will be Gzipped.

Testing - Check if GZIP Compression is Enabled

To test whether compression is working or not, use the developer tools in Chrome or Firebug for Firefox and ensure the HTTP response header is set:

Content-Encoding: gzip 
like image 160
Ryan Avatar answered Oct 22 '22 00:10

Ryan