The iframe framework replaces the master page

Source: Internet
Author: User

The headers and tails of all pages of many websites are the same. This time, the wine industry website is also the same. The headers and tails are fixed, so I didn't think about anything at this time, the master page is created, and the master page is applied to other pages. However, this website does not need to write back-end code. You can simply write to a static page to display some things. However, you cannot directly apply the master page to a static html page. After thinking about using the iframe framework, you don't need to use the master page. After the header and tail of the page are designed, put the iframe framework in the middle and click different labels to load different static pages. The following describes the master page and iframe framework.

Master page

You can use the master page to create a consistent layout for pages in the application. A single master page can define the desired appearance and standard behavior for all pages in the application. The usage of a master page is similar to that of a common page. It can be visually designed or written with post code. Unlike a normal page, a ContentPlaceHolder control is provided. If the master page contains multiple ContentPlaceHolder controls, you must set the corresponding Content control on the Content Page; the master page cannot be accessed by users.

Advantages

You can use the master page to process general functions of a page in a centralized manner. If you want to change this function, you do not need to change too much. You only need to update the function at a position on the master page. Solve the Problem of changing one page to dynamic whole site during webpage design. You can use the master page to easily create a group of controls and code, and apply the results to a group of pages.

Disadvantages

The style is not flexible enough. If AJAX is not used, all data is loaded during refresh.

Iframe framework

Iframe is an HTML tag used for a document or a floating framework. The iframe element creates an inline framework (intra-row framework) that contains another document ). We can use the iframe framework to display multiple pages in a browser form.

Advantages

When reloading a page, you do not need to reload the entire page. Instead, you only need to reload a frame page on the page, which reduces data transmission and speeds up page download.

The technology is easy to master and easy to use. It can be mainly used on pages that do not require a search engine to search.

Easy to create navigation bar.

Comparison between the master page and iframe framework

The dashboard page is compiled to generate HTML, occupying resources. The iframe framework is the original HTML that is not compiled.

The iframe frame is faster than the master page, but is not easily indexed by search engines.

The master page is easy to maintain, but the whole page will be refreshed if ajax is not used.




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.