ASP.NET Performance Tips
page 11 of 19
by Adiseshu Dasari
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 57653/ 579

Trim the page size

Use script includes for any static scripts in your page to enable the client to cache these scripts for subsequent requests. The following script element shows how to do this.

Listing 5

<script language=jscript src="scripts\myscript.js">

Remove characters such as tabs and spaces that create white space before you send a response to the client. Removing white spaces can dramatically reduce the size of your pages. The following sample table contains white spaces.

Listing 6

// with white space
<table>
  <tr>
    <td>hello</td>
    <td>world</td>
   </tr>
</table>

The following sample table does not contain white spaces.

Listing 7

// without white space
<table>
<tr><td>hello</td><td>world</td></tr>
</table>

In an Internet scenario that involves slow clients, removing white space can increase response times dramatically.

·         Limit the use of graphics, and consider using compressed graphics.

·         Consider using cascading style sheets to avoid sending the same formatting directives to the client repeatedly.

·         Avoid long control names; especially ones that are repeated in a DataGrid or Repeater control. Control names are used to generate unique HTML ID names. A 10-character control name can easily turn into 30 to 40 characters when it is used inside nested controls that are repeated.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 7/5/2008 7:32:43 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search