Is there any reason why MicrosoftAjax.js is not minified? Is there any reason why MicrosoftAjax.js is not minified? javascript javascript

Is there any reason why MicrosoftAjax.js is not minified?


I'm surprised at these misleading answers.

ASP.NET AJAX has always provided both debug and compressed versions of MicrosoftAjax.js. A combination of the web.config's debug setting and ScriptManager's ScriptMode property control which script is referenced.

Additionally, you may use the "retail" setting to force compressed scripts regardless.


All the scripts in System.Web.Extensions are minified -- there are two versions of each, as Dave Ward's excellent answer points out. ScriptManager by default will use the debug version when the web.config is in debug mode. Flip it to release with the retail setting or debug="false", and look at the script then.

Also, scripts served through WebResourceHandler or ScriptResourceHandler are in fact cached. They are cached in the best possible way -- forever, so they don't even need to 301 on future visits. The querystring is as it is, because it contains encrypted data. It is encrypted because it contains information about the script resource, including an assembly name, and also because it prevents cache flooding attacks.

Not looking for rep here, just wanted to give more detail.


See http://www.codeproject.com/KB/aspnet/AspNetOptimizer.aspx, you need the

enableScriptMinification="true"

option and add MicrosoftAjax.js to the list