Server Side Includes

Server Side Includes (SSI) is a simple interpreted server-side scripting language used almost exclusively for the Web.

The most frequent use of SSI is to include the contents of one or more files into a web page on a web server. For example, a web page containing a daily quotation could include the quotation by placing the following code into the file of the web page:

With one change of the quote.txt file, all pages including the file will display the latest daily quotation. The inclusion is not limited to files, and may also be the text output from a program, or the value of a system variable such as the current time.

Server Side Includes are useful for including a common piece of code throughout a site, such as a page header, a page footer and a navigation menu. Conditional navigation menus can be conditionally included using control directives.

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.

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.

Apache, nginx, lighttpd and IIS are the four major web servers that support this language.

SSI has a simple syntax: . 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.

Read more about Server Side Includes:  Client Side Includes

Famous quotes containing the words side and/or includes:

    Some things in life are bad
    They can really make you mad
    Other things just make you swear and curse
    When you’re chewing on life’s gristle
    Don’t grumble, give a whistle
    And this’ll help turn things out for the best ...
    And ... always look on the bright side of life.
    —Monty Python’s Flying Circus. Mr. Frisbee III (Eric Idle)

    The complete life, the perfect pattern, includes old age as well as youth and maturity. The beauty of the morning and the radiance of noon are good, but it would be a very silly person who drew the curtains and turned on the light in order to shut out the tranquillity of the evening. Old age has its pleasures, which, though different, are not less than the pleasures of youth.
    W. Somerset Maugham (1874–1965)