Minify HTML output from an ASP.Net MVC Application

前端 未结 5 1112
余生分开走
余生分开走 2020-12-24 01:36

This is likely a duplicate of the below question but the only answer is a dead link:
Minify Html output of ASP.NET Application

When working with ASP.Net one of t

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-24 01:55

    This link works (from the related link that you provide). It has a solution that let you replace the WebRazorHostFactory by one that minifies your HTML.

    To make it work, you have to add the following in your Web.config file:

    
      
    
    

    This section is usually placed into Views\Web.config.

提交回复
热议问题