0

I have been advised to enable gzip on a website to help improve page speed.
I know i need to do this via IIS(i have no htaccess file on this asp.net site) but don't know how to go about it.

The procedure must be done on a folder/site level rather then the entire of our IIS server and i'm struggling to find out precisely how to do this.

A general point in the right direction or a complete recipe sheet would be very much appreciated.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by arun_cdm
0

Procedures
To enable global HTTP compression by using IIS Manager
1.
In IIS Manager, double-click the local computer, right-click the Web Sites folder, and then click Properties.
2.
Click theService tab, and in the HTTP compression section, select the Compress application files check box to enable compression for dynamic files.
3.
Select the Compress static files check box to enable compression for static files.
4.
In the Temporary directory box, type the path to a local directory or click Browse to locate a directory. Once a static file is compressed, it is cached in this temporary directory until it expires, or the content changes. The directory must be on the local drive of an NTFS–formatted partition. The directory cannot be compressed or shared, and the access control lists (ACLs) for the directory must include Full Control access to the identity of the application pool or to the IIS_WPG group.
5.
Under Maximum temporary directory size, click a folder size option. If you specify a maximum size under Limited to (in megabytes) (the default setting is 95 MB), then when the limit is reached, IIS automatically cleans up the temporary directory by applying the "least recently used" rule.
6.
Click Apply, and then click OK.
Important
You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /user:MyComputer\Administratorcmd to open a command window with administrator rights and then type cscript.exeScriptName (include the script's full path and any parameters).

-------------------------------------------------------------------------------

To enable global HTTP compression by using Adsutil.vbs
1.
Open a command prompt.
2.
To enable dynamic compression, type the following at the command prompt and then press ENTER:
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true
3.
To enable static compression, type the following at the command prompt and then press ENTER:
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true
To enable HTTP Compression for Individual Sites and Site Elements
1.
Disable global static compression by executing the following command at a command prompt:
adsutil set w3svc/filters/compression/parameters/HcDoStaticCompression false
2.
Enable static compression at this directory by executing the following command at a command prompt:
adsutil set w3svc/1/root/Home/StyleSheets/DoStaticCompression true
To disable static compression for only a single directory, first enable global static compression (if it is disabled) and then disable static compression at that directory. For example, to enable static compression for a directory at http://www.contoso.com/Home/StyleSheets, perform the following steps:
1.
Disable global static compression by executing the following command at a command prompt:
adsutil set w3svc/filters/compression/parameters/HcDoStaticCompression true
2.
Enable static compression at this directory by executing the following command at a command prompt:
adsutil set w3svc/1/root/Home/StyleSheets/DoStaticCompression false

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.