Website performance tuning exercise- jslint+jsmin+Yslow+gzip on IIS7

Day in front end land (way to insult yourself and regain composure)

1. Use Yslow on Firefox, click on the components/stats to find out the offenders.

2. Accept humbly the results around – # of http calls/javascript files – their size/non use of cache either at client/server, non combination of common js/css files. Start from initial size of 375 k of most complex page.

3. Start fixing –

a. Use jslint to run on js files to find “loose interpretation” problems of syntax. Forgetting a “;” caused me sleepless night for particular  codepath.

b. Use jsmin to safely minify the javascript files. Additionally look at packer as wrapper.

c. Use yslow to identify problem areas (grok  yslow scoring -ignore CDN advice)

d. Tread safely on “minimizing the js file calls” as individual files could be present across files and may not require combining. Tackle this at end.

e. First enable gzip on iis7 for static and dynamic stuff assuming modern browsers will be used.


 f. Use the caching of iis7 for “non changing” files like jpg/css etc.

g. Attempt combining css files and changing the references (little cumbersome) – actually this can be overcome by “custom http module”.(don’t bother with http module as of yet)

h. Attempt combining js files as part of the deployment post step and change the references across aspx/html files.

Gzip always does not work for IIS7/IIs6 as you expect🙂 live with it.






But final tested size of 33k is well worth the effort🙂.

IIS7 – config changes

1.  Enable the IIS7 compression
AppHost config (way below system32\inetsrv\config)

<httpCompression directory=”%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files”>
<scheme name=”gzip” dll=”%Windir%\system32\inetsrv\gzip.dll” />
<add mimeType=”text/*” enabled=”true” />
<add mimeType=”message/*” enabled=”true” />
<add mimeType=”application/x-javascript” enabled=”true” />
<add mimeType=”*/*” enabled=”false” />
<add mimeType=”text/*” enabled=”true” />

2. Enable the dynamic compression

appcmd set config -section:urlCompression /doDynamicCompression:true

3. Enable the <serverruntime frequenthitthreshold=”1″> from default of 2 ensuring file will be compressed at first request rather than try to wait for 2 requests within 10 secs of same kind.

%windir%\system32\inetsrv\appcmd.exe set config
-section:system.webServer/serverRuntime -frequentHitThreshold:1

Website performance tuning exercise- jslint+jsmin+Yslow+gzip on IIS7

One thought on “Website performance tuning exercise- jslint+jsmin+Yslow+gzip on IIS7

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s