Understanding static Web pages and Dynamic Web pages

Source: Internet
Author: User

How static Web pages work

Static Web pages, also known as normal web pages, are relative to Web pages. Static Web pages do not mean that elements in a Web page are static, but rather that there is no program code in the Web page file, only HTML (Hypertext Markup Language) markup, the general suffix is. htm,. html,. shtml or. xml, and so on. In a static Web page, you can include GIF animations, and when the mouse passes the Flash button, the button may change.

Once the static Web page is made, the content will no longer change, no matter who accesses it, the content is the same.

If you want to modify the contents of a Web page, you must modify its source code and then upload it to the server again.

For static Web pages, users can double-click to open, see the effect and access to the server is the same, that is, whether the server participates in the content of the page will not affect. This is because the content of the Web page is determined before the user accesses the page, and the content of the page is no longer changed, no matter how and when the user accesses it.

The workflow of a static web page can be divided into the following 4 steps.

    1. Write a static file and publish it on the Web server;
    2. The user enters the URL of the static webpage in the address bar of the browser (Uniform Resource Locator) and presses the ENTER key, the browser sends the request to the Web server;
    3. The Web server finds the location of this static file and converts it to HTML stream to the user's browser;
    4. The browser receives an HTML stream that displays the contents of this page;

In step 2-4, the contents of the static Web page do not change. The schematic of its work, as shown below.

How Dynamic Web pages work

Dynamic Web page refers to in addition to HTML tags in the Web page file, but also includes some implementation of specific functions of the program code, which makes the browser and the server can interact with each other, the server can dynamically generate the content of the Web page based on the client's different requests. The suffix name of a Dynamic Web page is usually different depending on the programming language you are using, typically. asp,. aspx, CGI,. php,. Perl,. JSP, and so on. Dynamic Web pages can display different information depending on the time and the different visitors. Common message boards, forums, chat rooms are implemented with dynamic Web pages.

Dynamic Web pages are relatively complex and cannot be opened directly by double-clicking. The workflow of a Dynamic Web page is divided into the following 4 steps.

    1. Write the Dynamic Web page file, which includes the program code, and publish on the Web server;
    2. The user enters the URL of the Dynamic Web page in the address bar of the browser and presses ENTER (enter), the browser sends the access request to the Web server;
    3. The Web server finds the location of this dynamic Web page and dynamically builds the HTML stream to the user's browser according to the program code therein;
    4. The browser receives an HTML stream that displays the contents of this page;

As can be seen from the whole workflow, when a user browses a dynamic webpage, it needs to execute the webpage file dynamically on the server, convert the dynamic webpage containing the program code into a standard static webpage, and finally send the static webpage to the user. The schematic of its work, as shown below.

Understanding static Web pages and Dynamic Web pages

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.