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

Recently I learned about static pages. It seems that static pages are really good. They can improve the response speed of website pages, reduce the pressure on servers, and reduce access to databases. However, both technologies have two sides, static pages are also bad. The following is a summary of other people's information. I hope it will be useful to you.

1. First 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 lies in its management, maintenance, and interaction functions. The advantage of static Web pages is the stability of information content, 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 independent of servers, the server returns a complete webpage only when the user requests it. The content on the dynamic page is stored in the database and provides personalized webpage content based on the 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 accesses. 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.

2. Differences between static 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 rapidly, the functions of a website are not that complex. You can use static web pages to perform website operations easily. On the contrary, dynamic web pages must be used to complete a website.

 

3. When 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.

4. static 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: Self-written code 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)

 

5. Problems to be considered in the face of today's search engine technology

(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?

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

The update frequency of the second search engine is low, and the Access Frequency of Baidu spider on asp pages is much higher than that of html.

Three 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, but it does not have much advantage now.

4. With 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.

5. The hmtl page also decreases over time.

The sixth html page does not support adding more records. When I made a website, I found that the asp Website has more records than html.

7. 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?

  

  

  

 

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.