Click here to Skip to main content
Click here to Skip to main content

Tagged as

Improve in AJAX response.

, 23 May 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
We can improve ajax response by following way.

1)Optimization in ScriptManager
There is a ToolkitScriptManager control in the AJAX Control Toolkit, we can replace the default <asp:scriptmanager> control with this, it supports the ability to dynamically merge multiple client-side Javascript scripts into a single file that is downloaded to the client at runtime. Better yet, only the Javascript needed by the specific controls on the page are included within the combined download, to make it as small as possible.
-we also got about a 50% download speed improvement by only having one request.
<%-- <asp:ScriptManager runat="server" ID="SM1" EnablePageMethods="true" EnablePartialRendering="true"
        ScriptMode="Release" />
<ajax:ToolkitScriptManager  ID="SM1" runat="server" EnablePageMethods="true"   EnablePartialRendering="true" ScriptMode="Release"
</ajax:ToolkitScriptManager >

There is another property in ScriptManager named EnablePartialRendering, it gets or sets a value that enables partial rendering of a page, which in turn enables you to update regions of the page individually by using UpdatePanel controls.
So, if we using the UpdatePanel in the page, we must set this property to true, conversely, if the UpdatePanel is not using in our page, it would be better that we set the EnablePartialRendering to false.

2)Optimization in Web.config
To optimize the ASP.NET AJAX in our web application, first of all, we need to make sure the Compression and Caching is enabled in our web.config.
-The Caching will saving almost 95% of the network traffic in the second time we request the page.

<scriptResourceHandler enableCompression=“true” enableCaching=“true”/>

These above changes very well worked for me .
i hope this will help you too.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Tripathi Swati
Software Developer (Senior) RadixWeb India
India India
No Biography provided

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 24 May 2010
Article Copyright 2010 by Tripathi Swati
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid