I suggest you ...

Compress and minify published ASP.NET pages

I made a small test and on a standard ASP.NET page, just only with removing whitespaces and line breaks, page size decreased by %35-40. Lower page size means higher performance. There are solutions for it but all are based on server side dynamic solutions. But there is a simplier way. For ex. just clean it when it is published and generate dynamic controls accordingly. It won't any give runtime overhead and will only give performance.

258 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Ömer ÇelikÖmer Çelik shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    4 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Bertrand Le RoyBertrand Le Roy commented  ·   ·  Flag as inappropriate

        Almost all controls use a html text writer. It should not be too hard to pick at runtime between the regular one used today and a compressing one, based on config.
        What will be more of a challenge, however, is the static strings in aspx and cshtml files. You would need a different method for those. One possibility would be to do the compression at compile-time, based on the debug/release current config. When compiling a file, the generated code could feed compressed strings to the compiler.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        What is URL REDIRECTION?How can i use this concept in my .net?
        my task is i have generated one url like this "http://example.com/";
        I am passing one pearameter like "http://example.com/Empno=1";
        I want to display Ename in Database table that corresponding "Empno"
        plz Help me Give me one simple example

        I am new this concepts
        plz Help me send source code to my mailID:mandla.anilbabu@gmail.com

      • Ömer ÇelikÖmer Çelik commented  ·   ·  Flag as inappropriate

        It is good, but my point is doing this on dynamic pages without any effort. So, when debugging etc. it will show full page output with indentation etc. But when it is published, it means it is ready to be deployed, clean the HTML tags and publish accordingly. So, no runtime performance decrease and we will get smaller pages.

      Feedback and Knowledge Base