How to distinguish between static web pages and dynamic web pages

When building a website, you often hear static and dynamic web pages, but what's the real difference? Next, carefully analyze the difference between the two. Static web pages are the basis of website construction, and there is no contradiction between static web pages and dynamic web pages. In order to meet the needs of search engine retrieval, even if dynamic website technology is used, web content can be converted into static web pages for publication.
1. Static web pages, generally referring to html:
1. In a static web program, the client uses a web browser (IE, FireFox, etc.) to connect to the server through the network (Network), and uses the HTTP protocol to initiate a request (Request), Tell the server which page I need to get now, all requests are handed over to the web server, and then the web server fetches the content from the file system (the disk where all the static pages are stored) according to the user's needs. After that, it is returned to the client through the Web server. After the client receives the content, it is rendered and parsed by the browser to obtain the display effect.
2. In order to make the static web page display more beautiful, use javascript/VBScript/ajax (AJAX is "Asynchronous Javascript And XML" (asynchronous JavaScript and XML), which refers to a web development technology for creating interactive web applications.) But these The special effects are displayed to the user on the client side by means of the browser, so there is no change on the server itself.
3. The static web cannot connect to the database;
4. The static web resource development technology: HTML;
5. Due to the extensive use of JS in the current web pages, the browser will take up a lot of memory when the page is opened, and the pressure on the server is reduced. , but the pressure shifts to the client.

2. Dynamic web pages, generally referring to jsp:
In dynamic web, the program still uses the client and the server, the client still uses the browser (IE, FireFox, etc.), connects to the server through the network (Network), and uses the HTTP protocol to initiate Request (Request), all requests now go through a WEB Server to process.
If the client requests a static resource ( .htm or .htm), the request is directly forwarded to the WEB server, and then the WEB server retrieves the content from the file system and sends it back to the client browser for parsing and execution.

If the client requests dynamic resources ( .jsp, .asp/ .aspx, .php), it will first transfer the request to the WEB Container (WEB container), connect to the database in the WEB Container, and retrieve data from the database, etc. After the operation, the display content of the page is dynamically pieced together. After the display content of the page is pieced together, all the display content is handed over to the WEB server, and then the content is sent back to the client browser through the WEB server for parsing and execution. Further in-depth analysis of the dynamic web access process: when the browser accesses the web, it seems to be a directly accessed jsp page, but in fact, the first place to arrive is the server, and the server creates the req and resp objects before using it for the jsp page. After setting the character set and obtaining the form parameters in the jsp, call the servlet to complete the business processing. Then return to jsp, jsp will generate the corresponding html page. The page will be returned to the server, and then the server will return it to the client through the response object.
  Static web pages and dynamic web pages are mainly distinguished according to the language of the web page. The language used for static web pages is HTML (Hypertext Markup Language); the language used for dynamic web pages is HTML+ASP or HTML+PHP or HTML+JSP and other website dynamic languages.

  The difference between static web pages and dynamic web pages:

  Whether the program is running on the server side is an important sign. The programs, web pages, and components running on the server side belong to dynamic web pages. They will return different web pages with different clients and at different times, such as ASP, PHP, JSP, ASP.net, CGI, etc. Programs, web pages, plug-ins, and components running on the client side belong to static web pages, such as html pages, Flash, javascript, VBscript, etc., which are forever unchanged.

  Static webpages and dynamic webpages have their own characteristics. Whether a website adopts dynamic webpages or static webpages mainly depends on the functional requirements of the website and the amount of website content. If the function of the website is relatively simple and the content update amount is not large, the method of using pure static webpages will be more efficient. Simple, on the contrary, dynamic web technology is generally used to achieve it.

  What is a dynamic web page? What are the characteristics of dynamic web pages?

  Dynamic websites can also adopt the principle of combining static and dynamic. Dynamic webpages are suitable for dynamic webpages. If it is necessary to use static webpages, you can consider using static webpages. On the same website, dynamic webpage content and static webpages It is also common for content to coexist.

  We briefly summarize the general characteristics of dynamic web pages as follows:

  (1) Dynamic web pages are based on database technology, which can greatly reduce the workload of website maintenance;

  (2) Websites using dynamic web technology can realize more functions, such as user registration, user login, online survey, user management, order management, etc.;

  (3) The dynamic web page is not actually a web page file that exists independently on the server, and the server returns a complete web page only when the user requests it;

  (4) The "?" in dynamic web pages has certain problems for search engine retrieval. It is generally impossible for search engines to access all web pages from a website's database, or for technical reasons, search spiders do not crawl URLs. The content behind the "?", therefore, websites that use dynamic web pages need to do certain technical processing when promoting search engines in order to adapt to the requirements of search engines

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

  In website production, webpages in pure HTML format are often called "static webpages", and early websites were generally made from static webpages. The URL form of static web pages is usually: https://blog.csdn.net/shmnh/article/details/51889667
  , which is suffixed with .htm, .html, .shtml, .xml, etc. On HTML-formatted web pages, various dynamic effects can also appear, such as animations in .GIF format, FLASH, scrolling letters, etc. These "dynamic effects" are only visual, and are different concepts from the dynamic web pages that will be introduced below. .

  We briefly summarize the characteristics of static web pages as follows:

  (1) Each web page of a static web page has a fixed URL, and the web page URL is suffixed with common forms such as .htm, .html, .shtml, and does not contain "?";

  (2) Once the web page content is published on the website server, the content of each static web page is saved on the website server regardless of whether there is a user access, that is to say, the static web page is a file actually saved on the server, Each web page is a separate file;

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

  (4) There is no database support for static web pages, and the workload in website production and maintenance is relatively large, so it is difficult to completely rely on static web page production when the amount of website information is large;

  (5) The interactive crossover of static web pages has greater limitations in terms of functions

  It can be easily judged like this: first, add names one after another, and second, see if it can interact with the server.

  Compared with dynamic web pages, static web pages refer to web pages that do not have a background database, do not contain programs, and are non-interactive. What you write is what it shows, nothing will change. Static web pages are relatively troublesome to update, and are suitable for display websites that are generally less updated.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325342604&siteId=291194637
Recommended