Web page making method to improve download speed

Source: Internet
Author: User
Tags define wysiwyg html editor
Speed | web | download

Method One: Optimize table speed

The use of tables increases the time to display pages, sometimes for a long time. Because the browser needs to fully understand the structure of the table before filling the contents of the table, the browser cannot render anything until the contents of most (if not all) tables are downloaded. When the table becomes larger, the information that needs to be processed is exponentially increased. On previous computers, these processing jobs were difficult, and table rendering took a lot of time.

Using a table 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 that's what it looks like-it's like that (remember: it's the speed of feeling, not the actual speed).

If you're using a nine-line table (with a lot of information for each unit), you can divide it into three small tables with three rows. This strategy is especially useful if you have a long Web page-the user can look at the previous table when downloading the following table.

Use the Width property

To make your HTML as user-friendly as possible, you should use the Width property appropriately for the < table> and < td> tags. This property allows you to define the width of the entire table, or to define the width of the cell. If things don't get better, you should be suspicious of browsers-that's why. So just check to see if you're right.-If you set a cell to 100 pixels wide, but you insert a 110-pixel-wide image into it, the result is that the table appears temporarily, and then disappears when you redraw yourself so that it can hold the image. Needless to say, the browser's filtering function is as annoying as its slow speed.

Put a form in a table unfortunately, different browsers and operating systems have different ways of handling form elements. The Drop-down menu on the MAC is much wider than in Windows. Netscape 4 handles writable text boxes as well as working with text, so if you increase the browser's default font size, all text boxes will become larger. The writable text box in Netscape 4 is 20% wider than the other browsers, and is affected by font marks. So, in short, your form may seem strange to some users--unless you deliberately control them.

Look at the following table:

I

This is a non-breaking line like

This

Axis

Now assume that the user has increased the default font size. When the table is enlarged to accommodate the larger text, the layout remains the same.

I

This is a non-breaking line like

This

Axis

Don't believe what you see, the resulting editor.

The table is really painful, and that's why the WYSIWYG HTML editor is catching on. But while these editors make it easy to build tables, they also produce some surprisingly inefficient code. In particular, GoLive's Cyberstudio uses a layout system that generates nightmares of bloated tables (especially when you're not carefully working on the user's manual).

The Layout and preview window of the WYSIWYG editor feels powerless to handle unnecessary nested tables, columns that do not have a table of the right size, or strange, roundabout HTML code. So if you want your form to be as slim and efficient as possible, and you're reluctant to give up the WYSIWYG editor, then you have to spend some time cleaning up your code. Once everything looks like it, open the HTML code with a text editor and you'll see that your table is pretty and clean.

Method Two: Using Cache speed

There is an important technology to make the image download faster. Those that appear repeatedly on the site-such as General logos, page heads, or navigation bars-do not have to be downloaded over and over. By default, Netscape and Internet Explorer set the cache on RAM or hard disks to store the most recently used images. If the browser knows the same file name, it reads the cache instead of downloading it from the web. This method greatly improves efficiency, so many automatic memory procedures are not recognized-you have to use stopwatch to test yourself.

Since the client's cache is so useful, the browser's cache should be considered when designing a Web page. For example, if a site has a large number of similar page-top graphics, you should try to split it so that the invariant parts are read from the cache immediately. Although a new diagram is called on each page, it is very small, so the download is fast.

Finally, put your image in one place, preferably on your server. This can reduce the time for DNS lookups. Also, if you want to store images of one or several servers crashing, it would be a very unfortunate thing.



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.