1

In my MVC3 project all the pages have the following HTML as output

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>My app</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="">
    <link href="/Content/bootstrap.min.css" rel="stylesheet">
    <link href="/Content/bootstrap-responsive.min.css" rel="stylesheet">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link rel="shortcut icon" href="/Content/icons/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/Content/icons/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/Content/icons/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/Content/icons/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="/Content/icons/apple-touch-icon-57-precomposed.png">
  </head>

  <body>

    <div class="container-fluid">
      <div class="row-fluid">
        <div class="span12">
          <div class="well">
            <h2>Test</h2>
          </div>
        </div>
      </div>
      <hr>
      <footer>
        <p>&copy;</p>
      </footer>
    </div>
    <script src="/Scripts/jquery-1.8.2.min.js"></script>
    <script src="/Scripts/bootstrap.min.js"></script>
  </body>
</html>

However, how can I make a filter to trim rows and remove blank lines, to get the output like the following example...

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My app</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<link href="/Content/bootstrap.min.css" rel="stylesheet">
<link href="/Content/bootstrap-responsive.min.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="shortcut icon" href="/Content/icons/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/Content/icons/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/Content/icons/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/Content/icons/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="/Content/icons/apple-touch-icon-57-precomposed.png">
</head>
<body>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="well">
<h2>Test</h2>
</div>
</div>
</div>
<hr>
<footer>
<p>&copy;</p>
</footer>
</div>
<script src="/Scripts/jquery-1.8.2.min.js"></script>
<script src="/Scripts/bootstrap.min.js"></script>
</body>
</html>
1

1 Answer 1

0

In ASP.NET MVC, you have can using action filter , caching & compression for fast load your site.

Please view link filter caching and compression (C#)

Hope it will be useful for you

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.