What is SHTML

Source: Internet
Author: User

What is SHTML

Using an SSI (server Side include) HTML file extension, SSI (server Side include), commonly referred to as "server-side embedding" or "server-side containment", is a server-based Web authoring technology similar to ASP.

How SSI works:

Before you send content to your browser, you can use the server-side include (SSI) directive to include text, graphics, or application information in a Web page. For example, you can use SSI to include a time/date stamp, a copyright notice, or a form for customers to fill out and return. For text or graphics that appear repeatedly in multiple files, it is an easy way to use include files. Save the content in one of the included files without having to enter the content into all the files. The include file is called with a very simple statement that instructs the WEB server to insert the content into the appropriate Web page. Also, when you use the Include file, all changes to the content can be done in one place only.

Because files containing SSI directives require special processing, SSI file extensions must be assigned to all SSI files. The default extension is. stm,. shtm, and. shtml.

The Web server processes the SSI instructions while processing the Web page. When the Web server encounters an SSI directive, the contents of the containing file are inserted directly into the HTML page. If the include file contains an SSI directive, the file is inserted at the same time. In addition to the basic instructions for including files, you can use SSI directives to insert information about a file, such as the size of a file, or to run an application or shell command.

Web site maintenance often encountered a problem is that the structure of the site has been fixed, but in order to update a little content and have to redo a large number of pages. SSI provides a simple and efficient way to solve this problem by placing the basic structure of a Web site in a few simple HTML files (templates), and then all we have to do is upload the text to the server and let the program automatically generate the page according to the template, making it easy to manage large sites.

Therefore, the use of shtml format for the purpose of the page and ASP, but because it is the API so faster, more efficient, faster than ASP, more than HTML, but because the server side can be used to include, so that the page update easy (especially batch update banner, copyright, etc.), imagine it, You have a piece of HTML, to be interspersed in the middle of some special server script, such as inserting other HTML paragraph, you choose ASP to complete this task, but if the task is more onerous, need more time, such as 5 s, this time you do not use ASP and SHTML, perhaps processing time only with 4s.

What's the use of SSI?

The reason to pull SSIis due to the acronym shtml-server-parsed HTML . Contains HTML text with embedded server-side contains commands. The server will completely read, parse, and modify the SHTML document before it is passed to the browser. sHTML and ASP have some similar, in shtml named file, use some SSI's instructions, like the instructions in ASP, you can write SSI instruction in shtml file, when the client accesses these shtml files, the server side will read and interpret these shtml files, Explain the SSI instructions contained in the shtml file such as: You can refer to other HTML files (#include) in the shtml file with the SSI directive, and the files that the server sends to the client are explained sHTML will not have SSI instructions. It realizes the function that HTML does not have, can realize the dynamic shtml, can say is an evolution of HTML. Like Sina's news system is like this, the news content is fixed, but its above ads and menus and so on is quoted in # #.

At present, there are several uses for the following purposes:

    1. Display server-side environment variables < #echo >
    2. Insert text content directly into the document < #include >
    3. Display information about Web documents < #flastmod #fsize > (such as date/size of file creation)
    4. Direct execution of various programs on the server < #exec > (such as CGI or other executable programs)
    5. Set SSI Information display format < #config > (such as file date/size display mode)

Advanced ssi<xssi> variables can be set using the IF condition statement.

What is SHTML

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.