static knowledge point

*, static page definition

A static page is a web page where the code of the web page is all in the page, and there is no need to execute asp, php, jsp, .net and other programs to generate the client web page code. The static page URL generally does not contain "?", "=", "&" and other special symbols.

 

*, static requirements

1. When the read/write load ratio reaches a certain threshold (depending on specific business needs)
2. Consider each component to decide whether to be fully static or partially static

 

*, static advantages

1. Easier to be indexed by search engines
2. Improve program performance

 

*, static scheme

Method 1: Use ready-made plug-ins such as ISAPI_Rewrite, IIS Rewrite, mod_rewrite of Apache HTTP server, etc.
Method 2: Write your own code to make dynamic web pages static. There are several methods:
       1. Create an FSO object, and use this object to dynamically create the required content into a file to generate an HTML page;
       2. Using template technology, replace the value of the special code in the template with the value received from the form or database field to generate an HTML file;
       3. Use Server.Transfer conversion technology,
Method 3: Use HttpWebRequest to request the client to obtain the returned resource and generate a static page, but use it with caution.

 

*, openstream of url

The execution result of this method is to return an inputstream object, the content is the page information after url access, so after the information is parsed, the static page of html text content can be obtained, so as to achieve static!

 

 -----------------------------------------------------------------------------------------------------------

*, An example of an architecture upgrade for static website upgrade

http://www.cnblogs.com/yizhu2000/archive/2008/09/01/1281532.html

 

Guess you like

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