Search code examples
asp.net-mvc-2compressiongzipstreamminifydeflatestream

how to both Compress and Minify content together?


i know we can compress response by declaring Response.Filter as GZip or Delfalte streams, but how i can perform both compression and minification together? declaring new class that inherits Stream, then first performing minify on content, then compress that by GZip or Deflate depending on User-Agent supported each?


Solution

  • hm... 2 days and nothing. check out Mads Kristensen approach http://madskristensen.net/post/A-whitespace-removal-HTTP-module-for-ASPNET-20.aspx. however this isn't exactly that i want but is better than nothing ;)