How to increase the speed of Web page display by clients (1)
Source: Internet
Author: User
web| Client | speed | show | page client to improve the speed of Web page display, to the client browser, is to get the HTML code, as soon as possible, rather than to wait until the remaining HTML has been accepted before the display.
The table tag in Html must accept the contents of the entire table before it can be displayed.
If the server is not responding quickly, it will take a long time to see a page open. In fact, this has already downloaded a lot of content. Just because some of the contents of the tag has not been downloaded, can not be displayed, so if the network bandwidth is not good, to the user experience will be very uncomfortable.
I am concerned about a literature site that uses JavaScript to load data islands in a way that better solves the problem of display speed. Interested can refer to this site? : http://www.pinshu.com/book/booklist1.asp?ShuID=645
He uses Table to define the main architecture of the entire page, the specific content to be displayed in each block, defined on the data island. The data is then loaded with JavaScript. And then show it again.
The advantage of this scheme is that the entire page architecture will soon be displayed. Then slowly load up every piece of data.
The disadvantage is that the data island, the use of JavaScript,? There are many that are only supported by IE. Bad compatibility.
Not appropriate for sites that need to consider compatibility.
Large web site, in the design time, will be appropriate to use table, a page by a number of independent table,? Each table is not very large, a table data download is complete, immediately can be displayed.
A typical site is http://news.sina.com.cn? It every piece of news is a table, and then each block is one aspect of the news, this aspect of the content download, you can immediately display. Don't wait for all data to be downloaded.
When working with tables, you can use the following methods
(1) Make the possible large table small
(2) Add <tbody> label
(3) using style= "table-layout:fixed" to make the table appear in a recursive manner
(4) give the width,height of each cell as far as possible
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.