Log in to like this post! AJAX Compression in 2010.1 [Infragistics] Murtaza Abdeali / Monday, February 08, 2010 Last week, Jason Beres put up an extensive road map of all the Products Infragistics will be shipping in the next couple of months. As you can see, these releases are going to be packed with all sorts of goodies. One of them is the new AJAX Compression module in ASP.NET’s 10.1 release. This new feature will compress Ajax responses generated by the server when using any of our Aikido-based controls. The browser will then de-compress the response on the client and process it further. When you turn on this feature, you immediately get the following benefits. Bandwidth Savings: When a response is GZIPed, the bandwidth used by the Ajax response will decrease automatically. Your bandwidth capacity will improve and you will be able to serve more users at any given time, without clogging the network. If you are using a hosting provider that charges based on the amount of data transfer, you will now have less usage on the bandwidth, hence saving you money. Time Savings: When the response size goes down, the round trip of an Ajax request from the server goes down with it. Based on how far the server is from the client machine on the network, the Ajax response time to the client will decrease by that much because the response is compressed and is faster to reach its destination. This will make your end-users a bit happier and productive :). To get a better understanding of this feature, let’s take a look at a very simple example. I have a WebDataGrid bound to the Invoices view(26 Columns X 2155 Rows) in NorthWind using SQLDataSource that has paging enabled. I am going to set up different page sizes in the WebDataGrid to monitor the round trip times as well the response sizes with and without Ajax compression. I am using FireFox 3.6 and FireBug to monitor the results. Also, my server is the same machine as the client. Without Compression WebDataGrid Page Size Response Size (KB) Round Trip Time (Secs) 20 50.6 1.18 50 81.1 1.14 100 140.9 1.23 200 261.8 1.4 500 627.7 2.13 1000 1228.8 4.32 With Compression WebDataGrid Page Size Response Size (KB) Round Trip Time (Secs) 20 7.4 1.19 50 10.2 1.19 100 15.8 1.19 200 27.4 1.29 500 62.5 1.51 1000 121 2.12 If you chart the data above in a line chart showing the two different data series, you can clearly see the benefits you get when using the Ajax compression feature. Ok, so now it is time to answer the million dollar question. What do I need to do to get all these performance gains? It is very simple, all you have to do is add the following HTTP module under your web.config section and now all the Ajax responses of the Aikido-based controls on your site will be compressed and you will get the benefits mentioned above. <httpModules> ... <add name="Compression" type="Infragistics.Web.UI.Framework.Compression, Infragistics35.Web.v10.1, Version=10.1.20101.85, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/> </httpModules> Just make sure your assembly version matches with the install version & build.