By applying it, some public areas of the website can be made into independent pages, and then this technology can be used to embed them into other pages that need the content of this area. mechanism: The SSI mechanism is a dynamic inclusion rather than a static generation. When a web server such as Apache receives a user's request and parses it to find an SSI inclusion instruction, it automatically takes out the included page and embeds it into the requested page and sends it to the user as a whole page. The user has no idea what the server has done, but only knows that he has received a complete page. benefit: From the working mechanism of SSI, we know that the inclusion action occurs every time a user requests a page, so if the content of the included page changes, it can be reflected in real time. Because of this, it is very easy to use it to realize dynamic embedding of static pages. We can use it to implement the public area of the entire website, or publish a lot of repeated area content into an independent static page, and then include it with SSI instructions where needed, such as the header and footer of the entire site, the latest news of the entire site, the hottest rankings, etc. This technology is widely used by most portal websites, such as 163, sina, etc. How to implement the hottest content: First, configure the SSI environment (refer to other SSI configuration tutorials) Then create an independent node to create an additional publishing or article page, bind a small template that calls the hottest content, specify a path and file name, and then publish it as a static html page /hot.html Then write the following SSI instructions in the box reserved for the hottest content on the homepage of the website <!--#include virtual="/hot.html" --> Change the extension of the home page to index.shtml (the default document page in the directory in the server configuration should also add the shtml type) In this way, you can see the effect by using /index.shtml. After adding a bunch of articles, you only need to update this hot.html, and you don’t need to update the homepage This method can even make the column list block on the homepage into this format. By utilizing the additional publishing function of each node, you can publish a small page with the content list of this node at the same time as publishing the column homepage, and then embed it on the homepage with SSI instructions. In the future, you only need to update the column content and the column additional publishing page, and the homepage does not need to be refreshed at any time! |
<<: Summary of web design experience and skills
>>: Deployment and Chinese translation of the docker visualization tool Portainer
There are many articles about MySQL installation ...
Here is a single-line layout using ul>li for l...
Flash file formats: .FLV and .SWF There are two ex...
Table of contents 1. Overview 2. Application Exam...
1. Docker cross-host communication Docker cross-h...
<br />In HTML language, you can automaticall...
Preface The mv command is the abbreviation of mov...
Table of contents Install Redis on Docker 1. Find...
Table of contents Preface Stored Procedure: 1. Cr...
Table of contents 1. Dep 2. Understand obverser 3...
1.1 Data Type Overview The data type is a field c...
Service.xml The Server.xml configuration file is ...
After CentOS 7 is successfully installed, OpenJDK...
During the development process, if garbled charac...
Preface: In the MySQL system, there are many diff...