How to create a web page that improves the download speed

Source: Internet
Author: User

Method 1: optimize table Acceleration
The use of tables increases the page display time. Sometimes this takes a long time. Because the browser needs to fully understand the structure of the table before filling in the table content, the browser cannot render anything before most (if not all) of the table content is downloaded. When the table grows, the information to be processed increases exponentially. On previous computers, the processing is not easy, and table rendering takes a lot of time.

After using tables for a long time, you will find that a large number of small tables are rendered faster than a large table with many rows. At least it looks like this-the truth is like that (remember: It's the speed you feel, not the actual speed ).

If you are using a nine-Row Table (each unit has a lot of information), you can divide it into three small tables with three rows. This policy is especially useful if your webpage is long-you can view the previous table when downloading the following table.

Use the Width attribute

To make your HTML as friendly as possible to the browser, you should properly use the Width attribute for the <table> and <td> labels. This attribute allows you to define the width of the entire table or the width of cells. If things are not doing well, you should suspect that the browser-is the cause. So you just need to check whether you are correct-if you set a cell to 100 pixels wide, but insert an image with 110 pixels wide, the result is: the table appears temporarily, and then disappears when you re-paint yourself to accommodate the image. Needless to say, this filtering function of the browser is as annoying as its slow speed.

Put the form in a table. Unfortunately, different browsers and operating systems have different processing methods for form elements. The drop-down menu on Mac is much wider than that in Windows. Netscape 4 processes Writable Text boxes like processed text. Therefore, if the browser's default font size is increased, all text boxes will become larger. The writeable text box in Netscape 4 is 20% wider than that in other browsers and is affected by the font mark. So, all in all, your forms may seem strange to some users-unless you intentionally control them.

See the following table: I
This a non-breaking line like
This
Axis

Now we assume that you have added the default font size. When the table is enlarged to accommodate the larger text, the layout remains unchanged.

I
This a non-breaking line like
This
Axis

Do not trust the WYSIWYG editor

Tables are really painful, Which is why what we see is what we get the popularity of HTML editors. However, while these editors make table creation easier, they also generate some surprising low-efficiency code. In particular, CyberStudio of GoLive uses a layout system that generates a nightmare bloated table (especially when you do not follow the user manual carefully ).

The WYSIWYG editor layout and preview window cannot work with unnecessary nested tables, columns of tables with no proper size set, or strange, box-to-box HTML code. Therefore, if you want your table to be as slim and efficient as possible, and are reluctant to give up the WYSIWYG editor, you have to spend some time cleaning up your code. Once all the content looks like this, open the HTML code in a text editor and you will find your table beautiful and clean.

Method 2: cache Acceleration

There is an important technology to make image download faster. Images that are repeated on a website, such as generic logos, headers, or navigation bars, do not need to be downloaded over and over again. By default, Netscape and Internet Explorer set cache on RAM or hard disks to store recently used images. If the browser recognizes the same file name, it reads the cache instead of downloading it from the Internet. This method greatly improves the efficiency, so many automatic recording programs cannot recognize it-you have to test it by yourself using the running table.

Since the client cache is so useful, the browser cache should be taken into account when designing web pages. For example, if a website has a large number of similar top images, you can split the images so that the unchanged parts can be immediately read from the cache. Although a new graph needs to be called on each page, because the graph is small, it is downloaded very quickly.

Finally, put your images in one place, preferably on your server. This reduces the DNS search time. In addition, if one or several servers you want to store images crash, it would be unfortunate.

Source: eNet Silicon Valley power

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.