After releasing the Ajax CDN, Microsoft has released another useful but already existing tool. Ajax Minifer, as the name says, is a tool for improving the performance of Ajax applications by reducing the size of Javascript files. It has been released along with Ajax Library Preview 6. Ajax Minifier supports two levels of minification: Normal crunching and hypercrunching. Normal crunching refers to the process of removing unnecessary whitespace, comments, semicolons, and curly braces. Hypercrunching refers to the process of shortening the names of local variables and removing unreachable code. Download it from here.
Ajax Minifier includes three components:
- Command line tool.
- MSBuild Task - Using which we can add a build task to our build process and do the minification for every build.
- Component (dll) - Enables us to use the minifier programmatically.
The following screenshot demonstrates the results of minifying the standard jQuery library using various minification tools. The bottom two files were minified using the Microsoft Ajax Minifier. Source: Scott Guthrie's blog. For a detailed comparison on YUI Compressor and Microsoft Ajax Minifier, check this.
-- Varun
No comments:
Post a Comment