With the roll-out of SharePoint over WAN links to different parts of the business, we have had to look at squeezing every bit of performance we could out of SharePoint. A big part of this was to reduce page / file size so as to reduce the amount of bandwidth required.


We decided to experiment with IIS compression and the results were rather favorable. Upon enabling IIS compression, the page size of our Intranet was reduced by 26%.

To enable IIS compression, log in to each of your Web Front End servers and do the following:

Open Command Prompt using ‘Run as Administrator’.

Type the following command:

%windir%\system32\inetsrv\Appcmd.exe set config -section:httpCompression -[name='gzip'].staticCompressionLevel:9 -[name='gzip'].dynamicCompressionLevel:7

followed by:

%windir%\system32\inetsrv\Appcmd.exe list config -section:httpCompression

If it worked, you should see that ‘staticCompressionLevel’ and ‘dynamicCompressionLevel’ has been configured.

Do an IISRESET /noforce on each of your Web Front Ends for the changes to take effect.

It is a good idea to run a program like ‘Fiddler’  so that you can check the difference before and after applying compression.

You can set both dynamic and Static compression levels to a value between 1 and 9, with 9 being the most resource intensive and highest compression. Typically, you would allow higher compression on Static files and less compression on dynamic ones so as not to overload your web front ends. Play around with the values and find out what is best for your environment.


Always test your changes in a test environment prior to applying it on your production systems :-). Enabling compression puts an additional load on your web front ends, especially on CPU. If your web front ends are already struggling, I would suggest you hold off until you get more resources for your SharePoint environment.