About the author

Miron Abramson
Me
Software Engineer, Senior Developer at CapitalIQ, and .NET addicted for long time.
Open source projects:
MbCompression - Compression library

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Creative Commons License

Blog Flux Directory
Technology Blogs - Blog Top Sites

Compress pages and WebResource.axd files in ASP.NET

(See updated post: Compress your pages, css, js and WebResources.axd files for better performance)

I will not be long with words, becouse lot of good articles about http compression are all around the internet. ASP.NET gives us the great ability to filter the data that passing between the server and the client. One of the powerfull uses of that ability is to compress that data. Almost all of the latest versions of the browsers support http compression "built-in" in their side (the client side), So, that is there to be used ! I build my http module to be as simple as posible, and added comments that it will be understandable to most of the readers. The module will check the compression type that the client support (if at all) and use that type to compress the results of the page response, or the WebResourse.axd content that need to be sent to the client. Also, you can configure (using the web.config file - See ReadMe.txt file)  to specified mime types that generated by the page to be exclude and not be compressed, or specified specific pages to also be exclude from the compression.  I added support for MS-AJAX by disable the compression for ajax post-backs, but I never tested it with another AJAX framework, so any comments about that will be  happily receive.  Fill free to use this module on your own risk, and without any guarantee or warranty. Note that JavaScript files or CSS files with their normally form will not be compressed by this module, but WebResource.axd that contains that types will be compressed. Any comments will be happily receive ! 

P.B.

Compressing WebResource.axd files will increae your score in YSlow performance check  ;-)

Full Source code: 

See update source in the post:

New & Shiny WebResource.axd compression Module

Currently rated 5.0 by 5 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: ASP.NET | C#
Posted by Miron on Friday, September 07, 2007 10:38 AM
Permalink | Comments (3) | Post RSSRSS comment feed

Related posts

Comments

DotNetKicks.com

Friday, September 07, 2007 5:34 AM

trackback

Trackback from DotNetKicks.com

Compress pages and WebResource.axd files in ASP.NET

satya in

Tuesday, January 22, 2008 1:16 PM

satya

f

a gb

Tuesday, September 30, 2008 5:01 PM

a

a

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

Thursday, November 20, 2008 11:51 PM