Thoughts on performance improvements for JS and CSS files

I have been continuing some research on how to help improve our performance.  The first area I have been looking into have been around our CSS and JS libraries.  I thought I would share what looks to be the most promising options so far and start a conversation around them and other ideas.

 

Ideas/Tools

·         JavaScript

o   Compress existing JS files to reduce download

§  Yahoo seems to have the #1 tool out there and it is command line driven so it would be easy for us to automate it’s usage

·         http://developer.yahoo.com/yui/compressor/

o   Combine JS files into single file

§  We can use a feature built into ASP.NET to do this for us I think – it is a feature of the ScriptManager class

·         http://msdn.microsoft.com/en-us/library/cc488552.aspx

§  If this doesn’t work, here is a great JS compressor and combiner (also works with CSS)

·         http://svn.offwhite.net/trac/SmallSharpTools.Packer/wiki

·         CSS

o   Compress existing CSS files to reduce download time

§  Same Yahoo tool for JS will work on CSS

o   Combine CSS into single file

§  ASP.NET control for CSS that is just like the ScriptManager

·         http://gstylemanager.com/

§  Command line tools

·         http://cssmixer.codeplex.com/

·         http://csstidy.sourceforge.net/index.php

·         http://svn.offwhite.net/trac/SmallSharpTools.Packer/wiki

·         http://code.google.com/p/cssmerge/

 

Right now I like the ideas of the ScriptManager and StyleManager as these would require the least amount of work to implement and have the largest benefit (the compress and cache).  The main concern I have is that the ScriptManager may not play well with our JQuery code base – so we need to make sure we test carefully.  If it turns out these will not work, the Yahoo tool followed by the SmallSharpTools package looks to be our next best options based on what I have found so far.