Web development such as ASP, JSP, and PHP must understand the technology-when to use static pages and when to use dynamic pages

Source: Internet
Author: User

I recently learned about static pages. It seems that static pages are really good,It can improve the response speed of website pages, reduce the pressure on servers, and reduce the access to databases.But both technologies have two sides, and static pages are not good. Here is my summary of other people's documents, and I hope it will be useful to you.

  1First, we will introduce static pages and dynamic pages.

(1) static Web pages actually exist and are directly loaded to the customer's browser without being compiled by the server. Static pages occupy a certain amount of server space and cannot independently manage the pages for publishing updates. If you want to update the webpage content, you need to use the FTP software to bring down the file and use the web page creation software to modify it (with technical exceptions such as FSO ).

The Static Page method can be used to split the database, background system, and foreground. There is no absolute relationship between the two. To improve site security.The above is the biggest advantage of static pages. Fast, cross-platform and cross-server.

  The disadvantage of static Web pages is thatLimits on management, maintenance, and interaction FunctionsThe advantage of static Web pages is thatInformation Content stability, which makes it easy for search engines to index Web Page Information on the Internet. Website construction uses static Web pages only to help search engines index information, but does not mean that as long as it is a static Web page, it will be indexed by search engines, and dynamic web pages will not be indexed by search engines.

(2) dynamic pages are made in programming languages such as ASP, PHP, JSP, Perl, or CGI. dynamic pages are not actually webpage files that exist independently on servers, but onlyWhen a user requests, the server returns a complete webpage. The content on the dynamic page exists in the database and provides personalized webpage content based on different requests sent by the user; dynamic page content is not stored on the page, but in the database, which greatly reduces the workload of website maintenance;    

Dynamic Pages are one-to-multiple access. Through a page. You can return different data based on several parameters. However, a static page is a page corresponding to a content, that is, a one-to-one relationship.The advantage is that no matter how you access it, the server only transmits data to the requester. Does not perform script computing or read back-end databases. This greatly improves access speed and reduces some security risks.

  2Static pages and dynamic pages

  The main difference between a static webpage and a dynamic webpage is whether to run a program on the server. The programs and pages running on the client are static pages, which remain unchanged.

Static and dynamic web pages have different characteristics. What types of pages a website uses depends on the functions and content of the website,If the content of the website does not change quickly and the functions of the website are not so complex, it is relatively simple to use static web pages to run the website.. On the contrary, dynamic web pages must be used to complete a website.

 

  3When to use static pages and dynamic pages?

(1) If the content of the website does not change quickly and the functions of the website are not so complex, it is easier to use static web pages to run the website. On the contrary, dynamic web pages must be used to complete a website.

(2) websites using dynamic web technologies can implement more functions, such as user registration, user logon, online surveys, user management, and order management; static pages cannot implement these functions.

(3) HTML is what we generally call static websites. In general, static websites are almost not updated. In particular, in the news system CMS, the pages generated are rarely modified in the future; dynamic Pages often have a lot of real-time requirements. In actual applications, dynamic pages are used on websites with high update frequency. Let's take a look.

  4Static dynamic page technology

(1) The Foundation of a website construction is static webpages, and static webpages and dynamic webpages are not incompatible. In order to speed up the search in the website, it means that websites using dynamic web technologies can also convert the content of webpages into static Web pages for operation. Turning webpages into static ones is a very good method for website development and can speed up webpage opening.

(2)Static dynamic page

  Method 1:Use existing plug-ins, such as isapi_rewrite, IIS rewrite, and mod_rewrite on the Apache HTTP Server. They are all rewrite engines developed based on the regular expression parser. View the help they provide.

  Method 2:The code written by myself achieves static dynamic web pages. There are also several methods:
1. Create a FSO object. Use this object to dynamically create the required content into a file to generate an HTML page;
2. Use the template technology to replace the values of special codes in the template with values accepted from form or database fields to generate HTML files;
3. Use server. Transfer conversion technology,

  Method 3:Use httpwebrequest to request the client to obtain the returned resources and generate a static page. Generally, you only need to obtain the webpage content. Other resources can be placed on the server and loaded automatically. (Note: This method has obvious disadvantages and requires a large number of changes to the matching URL. We recommend that you use this method with caution)

 

5In the face of today's search engine technology needs to think about the problem

(1) Although static computing can improve the performance of the program, it is not the root cause for improving the overall performance. Just like a computer, it only has good CPU, good graphics card, and good memory, no. It depends on the overall performance. In many cases, it is the developer's reason, resulting in poor program performance. Therefore, it is best to use the project performance as the basis, supplemented by other optimization methods, and ultimately improve the performance of the entire application.

(2) Not only will each website not seal it up as before, but it is very enthusiastic about Seo. The so-called search engine-oriented optimization involves rewriting of access addresses, make Dynamic Web pages look like static Web pages, so that more and more search engines can be included, so as to maximize the chance that your content will be received by the target. However, websites fully developed with dynamic technologies need to be converted to static Web pages in the twinkling of an eye. At the same time, the Content Management Function of dynamic web pages must be retained; just as the same flying Mercedes suddenly demanded a 180-degree turn, the cost to be paid is very high, whether it is really worthwhile, it is indeed doubtful.

(3)Why is the benefit of static pages not conducive to website indexing? (This depends on the technologies developed by the current search engine)

The general search engine optimization views that static pages are conducive to the optimization of search engines. Therefore, many search engines have been generated to optimize and reconstruct website pages. Instead, they have to make their websites pseudo-static URLs, to increase your search engine optimization performance. However, search engine optimization has been developing for several years. In the past, static search can achieve great results, but is it still useful?

  IDynamic experience is better than static experience because information is updated quickly. The most important thing for search engines is the Search user experience.

  IIThe frequency of Search Engine updates is low, and Baidu spider visits to ASP pages are much more frequent than HTML.

  3.Search engine optimization aims to improve the ranking of your website in the search engine. I am afraid it is a fact-based website optimization service recognized by each search engine optimization. However, it does not have many advantages.

  ThuWith the development of search engine technology, especially Google's proficiency in dynamic code indexing, the technical level has completely reached the indexing HTML capability, and there is no difference.

  V.The hmtl page also decreases over time.

  Sat. The HTML page does not support adding more content. When I made a website, I found that the ASP Website contains more content than HTML.

  VII.Do not underestimate the strength of the search engine. Is it true that the development of the search engine has not exceeded "?" Is this symbol an obstacle? Still think static is easier to capture?

  

  

  

 

 

Related Article

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.