How to differentiate between static and dynamic Web pages

Source: Internet
Author: User

Static and dynamic Web pages are often heard when building websites, but what are their real differences? Next, carefully analyze the difference between the two. Static Web page is the foundation of the site construction, static Web pages and dynamic Web pages are not contradictory, in order to adapt to the search engine retrieval needs, even if the use of dynamic website technology, you can also convert the content of Web pages to static Web publishing.
A static web page, generally referred to as HTML:
1. In a static Web program, the client uses a Web browser (IE, Firefox, etc.) to connect to the server via the network, using the HTTP protocol to initiate a request, telling the server which page I need to get now, All requests are given to the Web server, and then the Web server extracts the content from the file system (the disk that holds all the static pages), depending on the user's needs. After the Web server is returned to the client, the client receives the content after the browser rendering parsing, to get the effect displayed.
2, in order to make the static Web page display more beautiful, using Javascript/vbscript/ajax (Ajax is "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), is a web development technique that creates an interactive Web application. However, these effects are presented to the user via the browser on the client, so there is no change on the server itself.
3, static web can not connect to the database;
4, static Web resources development technology: HTML;
5, because of the current Web page, a large number of use of JS, causing the browser to open the page, will occupy a lot of memory, the pressure on the service side is reduced, but the pressure shifted to the client.

Second, Dynamic Web page, generally refers to JSP:
In the Dynamic web, the program still uses the client and the server, the client still uses the browser (IE, Firefox, etc.), connects to the servers over the network, uses the HTTP protocol to initiate requests (request), and all requests now go through a web Server to process.
If the client is requesting a static resource (. htm or . htm), the request is forwarded directly to the Web server, after which the Web server takes the content out of the file system and sends it back to the client browser for resolution execution.

If the client is requesting a dynamic resource (. JSP,. asp/. aspx,. php), the request is forwarded to the Web Container (Web container), the database is connected in the Web Container, After a series of operations, such as extracting data from a database, and then dynamically piecing together the contents of the page, putting together the content of the page, all the content is presented to the Web server, and then the content is sent back to the client browser through the Web server for parsing and execution. Further analysis of Dynamic Web Access process: Browser access to the Web, it seems to be directly access to the JSP page, in fact, the first place to arrive is the server, the server created a good req and Resp objects and then to the JSP page use. Complete the business process by calling the servlet after setting the character set and getting the form parameters in the JSP. Then return to jsp,jsp and the corresponding HTML page is generated. The page is returned to the server, which is returned by the server to the client through the response object.
Static Web pages and dynamic Web pages are mainly based on the language of the Web page, static Web language: HTML (Hypertext Markup Language), Dynamic Web language: html+asp or html+php or html+jsp and other Web site dynamic language.

Static Web pages differ from the dynamic:

Whether the program is running on the server side is an important sign. Programs, Web pages, and components that run on the server side are dynamic Web pages that return different pages with different customers, at different times, such as ASP, PHP, JSP, ASP, CGI, and so on. Programs, Web pages, plug-ins, and components that run on the client are static Web pages, such as HTML pages, Flash, JavaScript, VBScript, and so on, and they are always the same.

Static Web pages and dynamic Web pages have characteristics, the site uses dynamic Web pages or static Web pages mainly depends on the function of the site and the content of the site, if the site features relatively simple, content update is not very large, the use of pure static Web pages will be more simple, the contrary generally use dynamic web technology to achieve.

What is a Dynamic Web page? What are the features of dynamic Web pages?

Dynamic Web site can also adopt the principle of static and dynamic, suitable for the use of dynamically web pages of dynamic Web pages, if necessary to use static Web pages, you can consider the method of static Web pages to achieve, on the same site, dynamic Web content and static Web content at the same time is also very common things.

We will briefly summarize the general features of the Dynamic Web page as follows:

(1) Dynamic Web page based on database technology, can greatly reduce the workload of website maintenance;

(2) The Web site using Dynamic Web technology can realize more functions, such as user registration, user login, online survey, user management, order management and so on;

(3) The Dynamic Web page does not actually exist independently of the Web page file on the server, but only when the user requests the server to return a complete Web page;

(4) "?" in the Dynamic Web page. "There are some problems in search engine retrieval, search engines are generally not able to access all pages from a database of a website, or for technical reasons, search spiders do not crawl URLs"? "After the content, so the use of Dynamic Web site in search engine promotion needs to do some technical processing to adapt to search engine requirements

What is a static Web page? What are the characteristics of static Web pages?

In the Web site production, the pure HTML format of the page is often called "static page", the early sites are generally made of static web pages. The URL of a static Web page is usually: 51889667
That is, the suffix of. htm,. html,. shtml,. xml, and so on. In HTML-formatted Web pages, you can also have a variety of dynamic effects, such as. gif format animation, FLASH, scrolling letters, and so on, these "dynamic effects" are only visual, and the following will be described in the Dynamic Web page is a different concept.

We will briefly summarize the characteristics of static Web pages as follows:

(1) Static Web pages each page has a fixed URL, and the URL of the Web page with the. htm,. html,. shtml and other common forms suffix, and does not contain "? ”;

(2) Once posted to the Web site server, regardless of whether there is user access, the content of each static page is saved on the site server, that is, static Web pages are actually saved on the server file, each page is a separate file;

(3) The content of static Web pages is relatively stable, so it is easy to be searched by search engines;

(4) Static Web pages do not support the database, in the production and maintenance of the site work is large, so when the site information is very large when the full reliance on static Web page production method is more difficult;

(5) The interactive intersection of static Web pages, there is a large limitation in function

Simple can be judged as follows: First, the prefix name, the second to see if the server can interact with the behavior.

Static Web pages are relative to dynamic Web pages, which means that there are no background databases, no programs, and no interactive Web pages. What you're making up is what it shows and there's no change. Static pages are relatively cumbersome to update, and are suitable for display sites that are less commonly updated.

How to differentiate between static 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.