views:

26

answers:

1

We have a SharePoint Solution that uses the Microsoft Ajaxtoolkit.

I am doing some performance testing and see that the javascript is being downloaded for each page, causing some page to download more than 1 MB.

The type of call that is being made is:

http://serverName/ScriptResource.axd?d=aMbl7-5dNZOmlggsdXNoTVIFa6esvsBgC6BHXX0EL95-pM5lSDjyY8ReL2JvKluJzYr9etKytxzEbXXTRh-bMV2x_m8iGd7S727g4aeKATA1&t=5aa0b262

The file that this is being returned by the above is MicrosoftAjax.debug.js.

Is there a way to avoid the javascript being downloaded for each page?

+2  A: 

Use the release library, not the debug one.

See this article on MicrosoftAjax.debug.js:

Once the development stage is finished, you can switch your application to the release version of the script (MicrosoftAjax.js), which is smaller and doesn’t contain the debugging features presented above.

seanhodges

related questions