At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What is Server Side Includes?

Server Side Includes (SSI) is a simple interpreted server-side scripting language used to insert dynamic content into web pages. By adding directives within HTML comments, SSI enables the addition of timestamps, file contents, or other variables without complex programming. It's like a web page's personal assistant, seamlessly integrating fresh data. Intrigued? Discover how SSI can revolutionize your website's functionality.
Vanessa Harvey
Vanessa Harvey

Server side includes (SSI), sometimes referred to as edge side includes, is a technology frequently used by web developers that consists of writing instructions regarding procedures that should take place during the serving of a web page. A web page is served by a server computer when a client computer requests its world wide web address. These directives are included or coded directly within extensible hypertext markup language (XHTML) documents to allow a static page to contain dynamically generated content without having to serve the entire page using scripting languages such as hypertext preprocessor (PHP).

The choice to use the technology of server side includes is often made by web developers when only a small portion of an XHTML document needs to be dynamically generated. For example, the current local time might need to be displayed on a static page. Although this can easily be achieved in a few lines of code written in any number of the available scripting languages, server side includes is frequently used for such purposes. Web pages composed almost entirely of dynamically generated content do not make use of server side includes; web developers instead opt for the coding of scripts in server-side scripting languages.

Racks of servers.
Racks of servers.

There are some advantages to using server side includes technology over that of scripting languages such as less code and a lighter load placed on the serving computer. Solutions for dynamically generating content across an entire web site, however, might involve the use of server side includes and scripting languages because the choice of which to use is determined by how much of each page of the site is static and how much is dynamic. Most web host companies offer their clients the option of using server side includes technology for their web pages.

Implementation of server side includes usually is a simple task, particularly for experienced web designers and developers. It typically consists of creating a .htaccess file to which code is added and then adding code to the XHTML pages in which this technology is to be used. The specific code added is determined by the exact dynamic content that needs to be generated in specific portions of the otherwise static page. Web files that make use of this technology must carry the file extension specified by the web host company, which is usually ".shtml" or "shtm," in order to work. Failure to edit the file extension of a document to use the technology is a common mistake, especially among inexperienced web designers and developers.

You might also Like

Discuss this Article

Post your comments
Forgot password?
    • Racks of servers.
      Racks of servers.