Optimizing

.YSlow Performance Analyzer


Yahoo's Plugin For Web Page Performance Analysis is YSlow

Bundling and Minification

Bundling - adding files together to lower HTTP request count. JavaScript and CSS files can be combined. Images can be combined into a "Sprite".
When combining JavaScript files, order is especially important.
Browsers have a limit to the number of HTTP requests they can perform at one time. The number of concurrent connections per host name:

IE7 = 2
IE8 = 6
IE9 = 6
IE10 = 8
Chrome 29 = 6

YSlow Performance Analyzer
www.yslow.org

Minification - reduces the size of the file by removing unnecessary characters. Can be performed on any interpreted language.
Levels of minification:
1. Remove white space and comments (simple to perform; minimal risks)
2. Remove extra semicolons and curly braces (has some risk)
3. Shorten the name of local variables (some risk)
4. Remove unused or unreachable code. (more risk)
5. Shorten function names and global variables (most risk)

Most minifiers target for level 3.
Different from compression, as a browser can interpret a minified file as-is (i.e. does not need to decompress first).

Minification savings varies. jQuery standard library reduces the file size by about one-third, while AngularJS file size is reduced to about one-eight.

Bundling and minification is easier because of support within development frameworks.

.Google PageSpeed Insights


Identify Ways to Make Website Faster and More Mobile-Friendly with Google PageSpeed Insights

ASP.NET Optimization Library

Get the ASP.NET optimization library as a NuGet package called "Microsoft ASP.NET Web Optimaztion". The documentation is located at CodePlex. They require ASP.NET 4.0+.