The Csi,ssi,esi of dynamic caching technology

Source: Internet
Author: User

Usually we talk about the network caching technology, mostly on the page as a unit, for example, news site will be executed after the result, cached as a static HTML file, the next visit directly to the static page. Reduced server pressure. However, if a page is mostly static, a part of it needs to be dynamic.

Dynamic content caching technology, in general, is the static static, the dynamic to maintain dynamic, the final combination.

There are roughly three possible scenarios: CSI, SSI, ESI

First, CSI (Client Side Includes) meaning: Through the iframe, JavaScript, Ajax, and other ways of the content of another page dynamically included.

Rationale: The entire page can still be statically translated into HTML pages, but dynamically loaded with Iframe,javascript or Ajax where it is needed.

Example: <iframe src= ' http://abroad.e2bo.com/index.php ' border= ' 0 ' ></iframe>

Advantages: Relatively simple, do not need server-side to make changes and configuration;

Disadvantages: not conducive to search engine optimization (IFrame method), JavaScript compatibility issues, and client caching problems may lead to updates can not be effective in time. It's not good enough for the customer experience.

Ii. SSI (Server Side Includes)

Meaning: Through the annotation line SSI command loads different modules, constructs as the HTML, realizes the entire website content renewal;

Principle: Through SSI call each module of the corresponding file, finally assembled as an HTML page, the need for Server module support (specific configuration this article does not elaborate), such as: Apache server needs to open Mod_include module;

Example:

<!--#include virtual= "header.html"-->

<!--#include virtual= "login.html"-->

<!--#include virtual= "footer.html"-->

Advantages: not subject to specific language restrictions, more general, only need a Web server or application server support, Ngnix, Apache, IIS and so on have better support.

Disadvantage: SSI can only contain loads on the current server and cannot directly contain files on other servers, that is, they cannot be included across domains;

III, ESI (Edge Side Includes)

Meaning and principle:

The online general explanation is as follows: by using a simple markup language to describe a piece of content in a Web page that can be accelerated and not accelerated, each page is divided into a small number of different cache control strategies, Enables the cache server to dynamically combine a small number of different parts before sending the full Web page to the user based on these policies. This control can effectively reduce the number of crawls from the server to the entire page, but only from the original server to extract a small number of cache fragments, so can effectively reduce the load on the original server, while improving user access response time. Unlike SSI, ESI executes on a caching server or proxy server.

Example:

 

<esi:include src= "login.php"/>

<div>

Advantages: Can be used to cache the entire page or page fragments, more suitable for caching the server;

Disadvantage: Currently there is less software to support ESI, and the official update is slightly slower, so it is not widely used.

conclusion, the article is only a summary of the three can be used for dynamic content caching programs, specifically in the project use, which, it needs specific situation specific analysis.

Original address: http://hi.baidu.com/%D0%A1%BB%C6%BB%C6%C3%C3%C3%C3/blog/item/1471ee3efb7d9fd99e3d6228.html

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.