I'm new to IIS. In short, I'm facing issues to set up the gzip http compression for "cfm js css" file types in IIS6.
The reference resource I followed is at: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true
Here are the exact steps I did:
- In IIS Manager, double-click the local computer, right-click the Web Sites folder, and then click Properties.
- Click the Service tab, and in the HTTP compression section, select the Compress application files check box to enable compression for dynamic files.
- Select the Compress static files check box to enable compression for static files.
- Change the 'Temporary directory:' to 'C:\Inetpub\compressed_static_files'.
- Under Maximum temporary directory size, click 'Unlimited' radio button.
- Click 'Apply' button and then click 'OK'.
However, these settings are for .htm, .html, .txt and .asp, .exe and .dll file type only. So, in order to add .js, .css and .cfm, I ran the following commands according to the instruction at the url: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5bce429d-c4a7-4f9e-a619-5972497b932a.mspx?mfr=true
Exact steps are:
cd c:\Inetpub\AdminScripts
cscript adsutil.vbs SET W3SVC/Filters/Compression/Deflate/HcFileExtensions "htm html txt js css"
cscript adsutil.vbs SET W3SVC/Filters/Compression/gzip/HcFileExtensions "htm html txt js css"
cscript adsutil.vbs SET W3SVC/Filters/Compression/Deflate/HcScriptFileExtensions "asp dll exe cfm"
cscript adsutil.vbs SET W3SVC/Filters/Compression/gzip/HcScriptFileExtensions "asp dll exe cfm"
To activate this, I restarted IIS. Steps I followed are:
- In IIS Manager, right-click my local computer and select 'All Tasks > Restart IIS...'.
- Select 'Restart Internet Services on ' and click OK.
- Click 'End now'.
At this point, the server is restarted and now I tested whether the http compression is working or not with the following steps:
- Open my web site in FireFox and go to any page with .cfm extension.
- Open up FireBug.
- Check 'GET' Request Headers for .cfm file. I saw 'Accept-Encoding: gzip, deflate'. This is what the browser sends to the server.
- Now, check 'GET' Response Headers for .cfm file. There is even no 'Content-Encoding:' header. I am supposed to see 'Content-Encoding: gzip' here to confirm the server sent .cfm file as gzip encoding.
The same case for 'js css' and even 'html' file too. I think it must be some very basic thing I'm missing here. It will be great if anyone could give me a hint on this.
Thanks in advance. Gen