Hi, I have been noticing that the Infragistics controls are adding dozens of calls to ScriptResource.axd to my pages. Obviously the Javascript for the client side features has to get to the client somehow and you are doing it with ScriptResource.axd which is fine. The problem is how many there are. A standard rule of thumb for performance of a website is to reduce the number of referenced Javascript and CSS files. I'm attaching an example of a website with a WebDataGrid on it that does absolutely nothing, it's not even bound to any data, and the page renders with one reference to WebResource.axd and FIFTEEN references to ScriptResource.axd. That is ridiculous. Is there not some way to combine those scripts into one?
Hello bartsipes,
Thank you for posting in our community.
What I can suggest for reducing the number of requests is using the Infragistics Content Delivery Network(CDN) to load your scripts.
First the EnableCDN property should set to True. This property directs all Infragistics controls on the page to use CDN as the source for JavaScript files. This could be achieved as following:
<ig:WebScriptManager runat="server"> <InfragisticsCDN Enabled="True"></InfragisticsCDN> </ig:WebScriptManager>
<
ig
:
WebScriptManager
runat
="server"
>
InfragisticsCDN
Enabled
="True"
></
</
The CDN delivers JavaScript, CSS and Image files for all Infragistics controls. For the Infragistics ASP.NET AJAX controls, you have the option to retrieve a combined JavaScript file for all the controls; This option eliminates multiple requests for each controls JavaScript file. To enable Combining functionality, use the EnableCombining property of the WebScriptManager component as following:
<ig:WebScriptManager runat="server"> <InfragisticsCDN Enabled="True" EnableCombining="True"></InfragisticsCDN> </ig:WebScriptManager>
EnableCombining
I believe this approach will help you achieve your requirement.
Please let me know if you have any additional questions regarding this matter.
Hi Vasya, thanks for getting back to me on this. I just realized I setup my example differently than my site. I am actually using the ToolkitScriptManager from the AJAX Control Library as we are using a few compoents from that library and the ToolkitScriptManager is required for those components to work. If I switch to use the Infragistics WebScriptManager then all the extended JavaScript for the AJAX Control library is not loaded. Is there any other way that I can configure the Infragistics CDN if I am not using the WebScriptManager?
Thanks
What I can suggest as alternative approach is enabling the CDN with an entry in the Web.config for the entire application. In order to enable the CDN support in the Web.cofig file, add the following:
<configuration> <configSections> <section name="infragistics.web" type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> </configSections> <infragistics.web enableAppStyling="true" styleSetName="Default" styleSetPath="~/ig_res" enableCdn="True" enableCdnScriptCombining="True"/> . . </configuration>
<configuration>
<configSections>
<section name="infragistics.web" type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</configSections>
<infragistics.web enableAppStyling="true" styleSetName="Default" styleSetPath="~/ig_res" enableCdn="True" enableCdnScriptCombining="True"/>
.
</configuration>
Since AJAX Control Toolkit derives from ASP.NET AJAX ScriptManager it is fine to replace one with the other.
Some further reference about Infragistics Content Delivery Network could be found at:
http://help.infragistics.com/Doc/ASPNET/2014.1/CLR4.0/?page=Web_Infragistics_Content_Delivery_Network_CDN.html
I hope you find this information helpful.
Please let me know if you need any further assistance with this matter.