Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Dreamweaver to optimize web pages reasonably

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to use Dreamweaver to optimize web pages reasonably". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to use Dreamweaver to optimize web pages reasonably"!

Reasonable call to CSS

When designing a web page, we already know that using the style sheet CSS to lay out the elements of the page can greatly reduce the HTML code.

Methods:

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

(3) right-click on a tag on the tag selector to select a style.

Although the page effect of these three methods is the same, because the first method will generate a "span" tag in the HTML code, if you use it too much, it will greatly fatten the page source files and affect the download speed. Therefore, the second and third methods should be used when calling CSS.

Offload the server

In interactive web pages, users often submit data to the server, wait for the data from the server to be processed, and return to the browser. The process of waiting is very annoying. For this reason, it is also necessary for us to consider the server when editing the web page. When making web pages in Dreamweaver, one of the tasks that can lighten the burden on the server is to verify the validity of the form submitted by the user, which only needs to be carried out on the browser side and does not have to go back to the server for verification, which not only reduces the burden on the server, but also makes the viewer less sad waiting.

Method: select the form, open the behaviors panel, click the "+" number to select "verify form", and then set it. By the way, this verification process actually uses JavaScript for authentication on the browser side. When doing this in Dreamweaver, it puts this JavaScript code in the header of the page, which is bound to make the full display of the page longer, because the browser has to download this code before downloading other page elements. Therefore, it is best to open the code editor in Dreamweaver and cut and paste the script to the end of the source code so that it can be downloaded at the end. In addition, when we add JavaScript script effects to a web page, you might as well set this if you don't want the page to take effect as soon as it appears.

Self-"lose weight"

At present, there are a lot of "weight loss tea" on the web page, which we can find everywhere, but in Dreamweaver, we don't have to look around for "weight loss tea". Using its own "weight loss" function is enough to make the page "slim and pleasant".

Method: select "clear redundant HTML" under the "Command" menu, and then you can set up to clear the redundant code of the web page.

Rational application of forms

Not only do we need to lighten the load on the server, but also on the browsers we use, that is, to shorten the time it takes for browsers to parse pages as much as possible. The addition of JavaScript scripts mentioned above is an example. Affect the browser on the page parsing there are tables, because the browser on the table parsing time and the size of the table, complexity is proportional to, and we in Dreamweaver for layout arrangements, are by adding a large number of tables to locate, and some people even in large tables into multiple small tables, which in essence is to increase the burden on the browser, so that the page presentation time is greatly increased. For this reason, when using the form, we should try to break it up as much as possible and avoid the layers of the table as much as possible.

At this point, I believe you have a deeper understanding of "how to use Dreamweaver to optimize web pages reasonably". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report