Server Side Includes

Server Side Includes, or SSI, are special commands that can be added to HTML documents to tell the Web server to insert some information that does not exist in the document itself. When a Web server encounters an SSI command, it executes it and inserts the result into the copy of the document sent to the Web browser, replacing the command with its result.

Namo WebEditor supports inserting three kinds of SSI commands in Edit mode:

include

The include command inserts the contents of a file that exists on the Web server. Typically, the file to be included contains HTML or plain text. For example, you might use an include command in multiple documents to insert a common footer in each document, avoiding the need to copy and paste the footer content into each document. (See “Inserting the contents of a file on the server“.)

echo

The echo command inserts the value of an environment variable—that is, some piece of information provided by the Web server regarding the current document or the server environment. Examples include the document’s file name, the local date and/or time, and the name and version of the Web server software. (See “Inserting the value of an environment variable“.)

time format

The time format command can be used to tell the Web server how to format the date/time strings produced by any succeeding echo commands that output a date or time. (See “Controlling the date-time format for an echo command“.)

Notes about using SSI commands
  • If you include an SSI command in a document, you should set its file name extension to “.shtml” rather than “.html” or “.htm”. Most servers are configured by default to look for SSI commands only in documents that have a “.shtml” or “.shtm” file name extension (“.shtml” is compatible with more servers).
  • Since SSI commands require a Web server to execute the command and output its result, SSI command results do not appear when you preview a document using either Namo WebEditor’s built-in preview mode or a Web browser. To view SSI results in a document, you must publish the document to a Web server and then view the published document in a browser.
  • Not all Web servers support SSI, and some that do support SSI may not be configured correctly to enable it. If you find that SSI commands in your documents do not work, even though you have changed the documents’ file name extensions appropriately, check your Web server software documentation or contact your Web server administrator.
In this section

Inserting the contents of a file on the server

Inserting the value of an environment variable

Controlling the date-time format for an echo command

Server Side Includes