Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
HOW TO: Enable ASPX Compression in IIS
Article ID: 322603 - View products that this article applies to.
This article was previously published under Q322603
This step-by-step article describes how to configure Internet Information Services (IIS) 5.0 to compress .aspx pages. To use .aspx pages, you must have the ASP.NET page framework installed. You add the compression functionality for .aspx files by editing the IIS metabase.
When IIS receives a request, it checks to see if the browser is compression-enabled. IIS then checks the file name extension to see if the requested file is a static file or contains dynamic content. If the file contains static content, IIS checks to see if the file has previously been requested and is already stored in a compressed format in the temporary compression directory. If the file is not stored in a compressed format, IIS sends the uncompressed file to the browser, and adds a compressed copy of the file to the temporary compression directory. If the file is stored in a compressed format, IIS sends the compressed file to the browser. No files are compressed until they have been requested one time by a browser.
If the file contains dynamic content, IIS compresses the file as it is generated and sends the compressed file to the browser. No copy of the file is stored.
The cost of compressing a static file is modest and is typically incurred only one time, because the file is then stored in the temporary compression directory. The cost of compressing dynamically generated files is a little higher, because they are not stored and must be regenerated with each request. The cost of expanding the file at the browser is minimal. Compressed files download faster, so are particularly beneficial to the performance of any browser that uses a network connection with restricted bandwidth (a modem, for example).
NOTE: Always back up the metabase before you edit it.
To enable IIS 5.0 to compress .aspx pages, follow these steps:
For more information about compression, see the IIS 5.0 online documentation at the following Microsoft Web site:
Article ID: 322603 - Last Review: November 21, 2006 - Revision: 2.2