As an ASP programmer, you will not doubt the importance of improving the performance of web applications. To make the program run faster, you may have been busy optimizing database or COM components. If you have done it, do you think of how to speed up to generate HTML code in the browser to improve performance? For end users, if the page can be displayed faster, you can win more praises. Improve the speed of HTML displayed in the browser can be achieved by some freshly known techniques. 1 Use the table nested? (Figure 1) Establish a complex structure in the page, generally achieved by placing an HTML table in the page. If you want to create a page: This page has a top navigation bar a left navigation bar, one on the right area. You can create it with a large table of two rows. In the first line, combine two columns, then insert a top navigation bar. In the column of the second row, insert a table to display the navigation button. In the right column, place a table to actually content. (See Figure 1) This code to be generated so nested is this:
TD> tr>
td>
tr> table> However, in fact, the browser finds the
tag is not immediately displayed on the screen, unless It finds the corresponding end tag table>. So, if your entire page is in a table, you will not display anything before receiving the last table>, so that this page will be downloaded after all the files can be downloaded by the user. When the amount of page data is large (such as search engine search results), this feature causes a temporary pause. In order to prevent this, it can be divided into many small forms when making it. At each of the
to the corresponding TABLE> this part of the HTML code is overloaded, the browser will display it. At the visitor's view, the page is gradually, part of the part, more and more appears on the screen. Feeling, such page display speed is faster than the full file is again downloaded. (Figure 2) To study the previous examples in accordance with this principle, you should divide the entire big table in the page into three separate tables. Use the first table to display the top navigation bar to adjust its width, make it enough to accommodate all content, complete it in a
Table> code segment. The lower half of the page is arranged in a second table on the left. Use the third table to accommodate the actual content.
(See Figure 2) Because each part is a complete form, it will be displayed immediately after each part of the code download. Thus, the top and the navigation bar will be more displayed more than the other parts of the page. Users will start downloading at this time, soon, can be displayed on the screen. This is much better than that makes users have been in a blank screen for a longer period of time. The modified code is this:
Td> tr> table>
td> tr> table>
Td> tr> table> 2 Also remember to close other tags in the above example, we only have to close the
tag earlier, allowing the page to display faster in the browser. In this kind of push, there are some similar tags that have the same characteristics. For example, a list box and a combo box