0

I want to know if I can apply compression/decompression to my existing aspx page. What I want to say is that,

  1. I must be able to compress the response send by the server in some compressed format . Please note, only the HTML Source to be compressed not entire aspx page to some .zip file format. I am saying so, as If copy the rendered HTML of my page in notepad and check its sizes, it varies in between 134kB-200kB (with Viewstates. And I can't disable that). I dont want to process my network that much load. I want it minmal, say 40-50kB is enough.
  2. At client machine that compressed HTML source will get decompressed and rendered as normal aspx page.

  3. Most Imp, my page are up and running. I need some HTTPHandler or Module or some sort of addin that will not require a lot of changes in my existing code. Can be used by making change in web.config . Minimal changes in aspx or master pages are welcome. In short , some global way of doing this.

  • Have you googled `web.config compression`? – I4V Apr 26 '13 at 06:10
  • @I4V .. no actually I dont have any idea about compression. I searched but I hav'nt got any thing satisfactory –  Apr 26 '13 at 06:12
  • Strange, because I found many useful docs in the first result page. – I4V Apr 26 '13 at 06:15
  • Thanks @I4V .. I got one .. actually whatever I got was for IIS level and since I am on shared hosting that does not allow me change the underlying settings and also they has put various limitations on their IIS. –  Apr 26 '13 at 06:18
  • ayways i got this one on your suggestion and I put it in my config. See the url http://am-blog.no-ip.org/BlogEngine/post/2010/11/23/Enable-Gzip-compression-in-ASPNET-using-webconfig-configuration.aspx –  Apr 26 '13 at 06:20

1 Answers1

3

All that is done by IIS and the browser. Just set static and dinamyc compression on IIS and you're done.

http://technet.microsoft.com/en-us/library/cc753681.aspx

http://technet.microsoft.com/en-us/library/cc754668.aspx

Chris Moutray
  • 18,029
  • 7
  • 45
  • 66
Oscar
  • 13,594
  • 8
  • 47
  • 75
  • I am on shared hosting and my host do not allow me to change IIS settings. I need code level solution –  Apr 26 '13 at 06:13
  • Then see this other article. http://labs.kaliko.com/2010/09/turn-off-http-compression-from.html – Oscar Apr 26 '13 at 06:17