How-to-simply...

Combine IIS HTTP Compression and Output cache in ASP.NET

  • 1 Add Dynamic Content Compression Role Service to IIS
  • 2 Enable compression in the IIS Manager (static and/or dynamic)
  • 3 Enable or disable compression at site/folder/file level
  • 4 Find Windows\System32\inetsrv\config\applicationHost.config file and edit this line:
    <urlCompression dynamicCompressionBeforeCache="true" ... />
  • 5 To support really old browsers add
    <%@ OutputCache Duration="300"
    VaryByContentEncoding="gzip;deflate" %>

References