Use Dreamweaver to optimize web pages

Source: Internet
Author: User
Tags join dreamweaver

In order to optimize the Web page, speed up the download speed, in addition to the picture optimization, but also to the other elements of the page to optimize. In the process of Web page weaving, if you can make full use of editing tools, can also be in the Web page production to achieve optimization purposes.

Here are some of the optimization techniques in Dreamweaver:

Reasonable call CSS

Web design, the use of Style form CSS to decorate the page elements, you can greatly reduce the HTML code, which we have very clear.

Method:

(1) is the selected object, from the right-click menu to select the definition of a good style to join; (2) Select a style for the object from the style panel;

(3) Select a style by right-clicking on a label on the label selector.

These three methods have the same page effect, but because the first method will produce a "span" tag in the HTML code, if too much use will definitely make the Web page source files greatly increased fertilizer, affecting the download speed. So when you call CSS, you should use the second and third methods.

Lighten the server

In the interactive Web page, users often use tables to submit data to the server, wait for the server data processing, return to the browser ... The process of waiting is very disturbing. For this reason, we also need to consider the server when we are editing the Web page. dreamweaver to make Web pages, to reduce the workload of the server to do a better job, is the user submitted the legality of the form of verification, just in the browser side, do not have to return to the server verification, both to ease the burden of the server, but also let the viewer less a sad waiting.

Methods: Select the form, open the Behaviors panel, click the + to select Validate form, and then set it. By the way, this verification process is actually using JavaScript to authenticate on the browser side. When you do this in Dreamweaver, it puts the JavaScript code in the header of the page, which makes the page's full display longer, because the browser downloads the code before downloading the other page elements. Therefore, it is best to open the Code Editor in Dreamweaver, clip the script to the end of the source code, and let it download at the end. In addition, when we add JavaScript scripting effects to a Web page, you might want to set this up if you don't expect the page to come into effect as soon as it appears.

Self "lose Weight"

The current web page "Slimming Tea" a lot, we can find everywhere, and in the Dreamweaver, we do not have to look around for "slimming tea", using its own "weight loss" function enough to make the Web page "slim and pleasant."

Method: On the Command menu, select Clear Extra HTML to set up the redundant code for the Web page to clear.

Reasonable application Form

We are not only to reduce the burden on the server, the use of the browser we need more burden, that is, to minimize the browser to the page parsing time, the above mentioned JavaScript script to join is an example. There are also tables that affect the browser's parsing of the page, because the browser to the table parsing time and table size, complexity is proportional to, and we in the Dreamweaver arrangement for layout, is by adding a large number of tables to locate, some people even in the large table to the multiple small table, This is in essence also increase the burden of the browser, so that the page rendering time greatly lengthened. For this purpose, in the use of tables, should be as far as possible to break the table, and as far as possible to avoid the table layers of the set.

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.