About the author

Miron Abramson
Me
Software Engineer,
CTO at PixeliT
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 2014

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 4.7 by 6 people

  • Currently 4.666667/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

Krunchit gb

Wednesday, February 11, 2009 6:51 PM

Krunchit

Thanks for sharing its features, it’s a great tool. I have used another similar tool at www.krunchit.net this is an online compression tool which identifies and works upon ten files at a time. Just browse files directly from web and compress or decompress them online. Moreover this is compatible with every file type and windows type. You don’t need to save or copy file on your hard disc, do everything online. Additionally, you can browse offline files as well and can zip or unzip them in their original location.

psychics us

Thursday, May 13, 2010 11:49 PM

psychics

This blog has some interesting info. I am really impressed with your efforts and really pleased to visit this post. Keep up the Good work going!! Thanks