Lably
Skip to content

Server Side Includes

Interpreted server-side scripting language

  • 2 min read
  • 3 chapters

Related on Lably

Through World Wide Web, Web server and HTML

In order for a web server to recognize an SSI-enabled HTML file and therefore carry out these instructions, either the filename should end with a special extension, by default .shtml, .stm, .shtm, or, if the server is configured to allow this, set the execution bit of the file.

Design

As a simple programming language, SSI supports only one type: text. Its control flow is rather simple, choice is supported, but loops are not natively supported and can only be done by recursion using include or using HTTP redirect. The simple design of the language makes it easier to learn and use than most server-side scripting languages, while complicated server-side processing is often done with one of the more feature-rich programming languages. SSI is Turing complete.

SSI has a simple syntax: <!--#directive parameter=value parameter=value-->. Directives are placed in HTML comments so that if SSI is not enabled, users will not see the SSI directives on the page, unless they look at its source. Note that the syntax does not allow spaces between the leading <!-- and the directive. Apache tutorial on SSI stipulates the format requires a space character before the --> that closes the element.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication