Enable HTTP Compression for Web Server
* Enable Direct Metabase Edit (Although not strictly required, this is for convenience which allows direct editing of the IIS metabase while IIS is running)
o In IIS Manager right-click on the server and select properties
o Check "Enable Direct Metabase Edit"
* Enable HTTP compression
o Right-click on the "Web Sites" folder and select properties
o On the Service tab check "Compress application files" and "compress static files"
o Create the folder D:\IIS Temporary Compressed Files*** This is where IIS caches compressed static files
o Change the "Temporary directory" to D:\IIS Temporary Compressed Files
o Under Web Service Extensions select "Add a new Web service Extension"
o Name the new extension "HTTP Compression"
o Add the required file c:\windows\system32\inetsrv\gzip.dll
o Check "Set extension status to Allowed"
o Should appear in extension list
* Modify the IIS metabase
o Edit C:\WINDOWS\system32\inetsrv\MetaBase.xml
o Search for "IISCompressionScheme"
+ You should see 2 entries, one for deflate and one for gzip (circled in green)
o Change the HcDynamicCompressionLevel to "9"
+ 10 is the highest compression but uses a lot of CPU. 9 is almost as compressed but requires far less CPU.
o Add the dynamic page extensions we want compressed (typically .aspx and .asmx, although this list may expand as new extensions are employed).
Be Careful
Spacing is EXTREMELY important in this file. The simplest way to guarantee no problem is to copy the "dll" line and modify to aspx, asmx, axd. Add js and css to the list that contains html
No comments:
Post a Comment