Version

About Ajax Compression

The new AJAX compression module in Ultimate UI for ASP.NET 10.1 will compress Ajax responses generated by the server when using any of Ultimate UI for ASP.NET AJAX controls based on the Ultimate UI for ASP.NET AJAX framework. 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 – 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.

  • Speed – When the response size goes down, the round trip of an Ajax request from the server goes down with it.

The following tables show the performance gains obtained from AJAX compression when using a WebDataGrid control with 26 columns and 2155 rows with paging enabled.

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

To enable AJAX compression, all you have to do is add the following HTTP module under your web.config section then all the Ajax responses of the Ultimate UI for ASP.NET AJAX controls on your site will be compressed and you will get the benefits mentioned above.

The following code shows you how to enable AJAX compression.

In HTML:

<httpModules>
        ...
        <add name="Compression" type="Infragistics.Web.UI.Framework.Compression, Infragistics4.Web.v10.1, Version=10.1.20101.85, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
</httpModules>