First, CSI (Client Side includes)
Meaning: The content of another page is dynamically included through IFrame, JavaScript, Ajax, and so on.
Principle: The entire page can still be static HTML page, but in the need for dynamic in the place through Iframe,javascript or Ajax to dynamically load!
Example: <iframe src= ' http://abroad.e2bo.com/index.php ' border= ' 0 ' ></iframe>
Advantages: Relatively simple, do not need to do server-side changes and configuration;
Cons: not conducive to search engine optimization (iframe mode), JavaScript compatibility issues, and client-side caching problems may cause the update will not be effective in time! For the customer experience is not good enough!
Second, SSI (Server Side includes)
Meaning: Loading the different modules through the Comment Line SSI command, constructs the HTML, realizes the entire website content update;
Principle: Through SSI calls each module's corresponding file, finally assembles the HTML page, needs the server module support (the specific configuration this article does not do the detailed), for example: the Apache server needs to open the Mod_include module;
Example:
<!--#include virtual= "header.html"-
<!--#include virtual= "login.html"-
<!--#include virtual= "footer.html"-
Advantages: not restricted by specific language, more general, only need Web server or application server support, Ngnix, Apache, IIS and so on have better support.
Disadvantage: SSI can only contain the load on the current server and cannot directly contain files on other servers, i.e. it cannot be contained across domains;
Third, ESI (Edge Side includes)
Meaning and principle:
The online general explanation is as follows: by using a simple markup language to describe the content fragments in pages that can be accelerated and not accelerated, each page is divided into different small sections to give different cache control strategies, Enables the cache server to dynamically group a small number of different parts before sending the full page to the user based on these policies. This control can effectively reduce the number of times the entire page is fetched from the server, but only by extracting a small number of fragments that cannot be cached from the original server, thus effectively reducing the load on the original server and increasing the response time of user access. Unlike SSI, ESI is executed on a cache server or proxy server!
Example:
<title>esi demo</title>
<body>
<esi:include src= "login.php"/>
<div>
</div>
</body>
Advantages: Can be used to cache the entire page or page fragments, more suitable for use on the cache server;
Disadvantage: Currently support ESI software is relatively small, the official update is also slightly slow, so the use is not very wide!
conclusion, the article is only a summary of the three can be used for dynamic content caching scheme, specifically in the project with no use, which, that needs specific circumstances specific analysis!
Transferred from: http://hi.baidu.com/huangmeimei86/item/5fff363ddb51fdf6df222152
Front-end content caching technology: Csi,ssi,esi