<commit_before>---
title: Compression
page_title: RadCompression | UI for ASP.NET AJAX Documentation
description: RadCompression
slug: controls/radcompression
tags: radcompression
published: True
position: 8
---

# RadCompression



## What is RadCompression?

Simply put, RadCompression is a HttpModule that is shipped with the Telerik UI for ASP.NET AJAX and is designed to *automatically* compress your AJAX and Web Service responses. In other words,RadCompression will intercept the bits that your server is sending back to a browser (or Silverlight-client, for that matter) and compress them. Once the compressed bits reach the browser, standard browser technology takes over and decompresses the response, so your application can work with it normally. The compression process is completely transparent to your client-side code (JavaScript or Silverlight) and your server-side code.It simply reduces the number of bits that are sent over the wire (from your server to your client) and thus -in theory - improves your page performance by reducing the TTLB (time to last byte).

## 

RadCompression is designed based on other HTTPcompression tools, such as the built-in **HTTP Compression** in IIS7 and higher versions. By adding RadCompression to your project, you start compressing your **AJAX** and **Web Service** responses.

**RadCompression**	will automatically detect and compress requests that expect these content response types	(as found in the HTTP request's "**ContentType**" header or "**AcceptsTypes**" header):

* application/x-www-form-urlencoded

* application/json

* application/xml

* application/atom+xml

These types generally reflect the content types returned by AJAX Web Services, ADO.NET Data Services,	and AJAX UpdatePanel responses, though there certainly are other scenarios that return these content types	(such as a typical RSS feed). If a browser supports compression (most modern browsers do) and RadCompression	is enabled, all content of this type will be compressed. The one exception is IE6, which does not support this compression well, so RadCompression will automatically ignore requests coming fromIE6 clients.

## How is RadCompression enabled?

Enabling RadCompression could not be easier. It is a simple matter of adding a HttpModule registration to the site'sweb.config. Specifically, you need the following:

````ASPNET
<httpmodules><commit_msg>Add separated two words<commit_after>---
title: Compression
page_title: RadCompression | UI for ASP.NET AJAX Documentation
description: RadCompression
slug: controls/radcompression
tags: radcompression
published: True
position: 8
---

# RadCompression



## What is RadCompression?

Simply put, RadCompression is a HttpModule that is shipped with the Telerik UI for ASP.NET AJAX and is designed to *automatically* compress your AJAX and Web Service responses. In other words, RadCompression will intercept the bits that your server is sending back to a browser (or Silverlight-client, for that matter) and compress them. Once the compressed bits reach the browser, standard browser technology takes over and decompresses the response, so your application can work with it normally. The compression process is completely transparent to your client-side code (JavaScript or Silverlight) and your server-side code.It simply reduces the number of bits that are sent over the wire (from your server to your client) and thus -in theory - improves your page performance by reducing the TTLB (time to last byte).

## 

RadCompression is designed based on other HTTPcompression tools, such as the built-in **HTTP Compression** in IIS7 and higher versions. By adding RadCompression to your project, you start compressing your **AJAX** and **Web Service** responses.

**RadCompression**	will automatically detect and compress requests that expect these content response types	(as found in the HTTP request's "**ContentType**" header or "**AcceptsTypes**" header):

* application/x-www-form-urlencoded

* application/json

* application/xml

* application/atom+xml

These types generally reflect the content types returned by AJAX Web Services, ADO.NET Data Services, and AJAX UpdatePanel responses, though there certainly are other scenarios that return these content types (such as a typical RSS feed). If a browser supports compression (most modern browsers do) and RadCompression	is enabled, all content of this type will be compressed. The one exception is IE6, which does not support this compression well, so RadCompression will automatically ignore requests coming fromIE6 clients.

## How is RadCompression enabled?

Enabling RadCompression could not be easier. It is a simple matter of adding a HttpModule registration to the site's web.config. Specifically, you need the following:

````ASPNET
<httpmodules>
{'fraction_non_alphanumeric': 0.05375, 'fraction_numerical': 0.0016666666666666668, 'mean_word_length': 5.202842377260982, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3797751', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1120, 'n_words': 646}