Last updated: February 12, 2019
Server Side Includes (SSI): Left In The ’90s?
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Static webpages are great for conveying information that doesn't change very often. Without the added bulk of dynamic features, they transmit quickly and can easily be cached for near-instant page loads. Unfortunately, they are static. Whatever you write is what your viewer sees, every time.
Server Side Includes allows website creators to include some limited dynamic content with their static HTML pages. This way, you get those super-fast load times, but you can also include some additional features not possible with a truly static page.
Server Side Includes are commonly used to create standard header and footers, which can be applied to every page in your site. By doing so, you can easily make changes to your header and footer by editing a single file, rather than having to edit every single web page.
Server Side Includes can also be used to display dynamic information about each document. For instance, you can add a "Last Updated" field to your webpages, which will automatically plug in the date the current file version was created. This saves you having to remember to change the date yourself. And it should provide some extra motivation to keep your website up-to-date.
Some other common uses for Service Side Include are displaying someone's IP address, adding the results from a small CGI program, such as a hit counter, and adding variable expressions to your page (such as the current time or date).
Does Anyone Still Use Server Side Includes?
In the early days of the World Web Web, SSI offered real value while having little impact on your site's load times or your server space. However, with the mass-adoption of broadband and the dramatic increases in server storage space, there's little need for such restrictions in a modern website. Especially when a simple cache plugin can provide similar speed benefits for a fully-dynamic site.
What's more, with the transition to Web 2.0, most web developers have turned to more powerful web applications, harnessing the capabilities of dynamic programming languages, such as Perl and PHP. While SSI performed simple dynamic actions with greater efficiency, it doesn't come close to the level of dynamic content expected by the modern Web user. This isn't to say it is a completely dead language, however. Some developers still find use for SSI, not as a tool for displaying dynamic content, but as a means of managing the modern tools they're using. For example, you can use SSI to manage your HTML5 content. It can also be a very useful language for beginning programmers, who are still focusing on basic HTML and web development.
While not used nearly as often as it was in the early days of the World Wide Web, Server Side Includes is still popular amongst some do-it-yourself developers who prefer simple, static pages. If you're interested in adding SSI to your site, there are plenty of online guides available to help.
- Apache Tutorial: Introduction to Server Side Includes: this site provides a great overview of what is possible with Server Side Includes and provides several code samples that you can include in your own site.
- University of Southern California's Guide to Server Side Includes: this site is less technical than the Apache tutorial, and may be more accessible to new developers. In provides instructions for embedding Server Side Includes into your page, as well as a list of common commands and available variables.
- Server Side Includes Tutorial: this tutorial provides a comprehensive overview of Server Side Includes, along with detailed instructions for adding SSI code to your page, setting up scripts, and utilizing the preset commands.
- Beginner's Guide to SSI: this short, five-part tutorial will have you up and running with Server Side Includes in less time than it takes you to make a cup of coffee. It includes step-by-step guides to adding contents from an external file (such as a footer file) to your page, displaying server information (IP address, current date, etc.), formatting dynamic content, and enabling your server to handle SSI.
Server Side Includes is not a hot topic in current books, but it was included in a number of guides to web design, Java, and server management in late 1990s and early 2000s. If you're looking for an in-depth, print guide, you may need to dig around a used book shop.
- Simplify Web Site Management with Server-Side Includes, Cascading Style Sheets, and Perl (2002) by Andrea Peterson: this book is fairly dated, but it's a definitive guide to everything you need to know about SSI.
- CGI Programming on the World Wide Web (1996) by Shishir Gundavaram: This one is out of print, but you can get it online through the O'Reilly Open Books Project. The chapter on Server Side Includes covers a range of SSI topics, including configuring SSI, using boilerplates, executing external programs, and troubleshooting common errors.
Server Side Includes allowed web developers to introduce basic dynamic programming into their static websites at a time when dynamic websites were still a rarity. Modern web users, however, expect much more dynamic content, and most developers have moved away from traditional, static HTML pages, making SSI all-but obsolete. Even do-it-yourselfers can easily achieve fare more dynamic capabilities using simple, online website builders or content management systems.
However, traditional static pages can still be useful, particularly if your content doesn't need regular updating or require custom content. It's also a perfect starting point for new HTML programmers. If you prefer static pages, or are maintaining an older site that you're not ready to do a full update on, Server Side Includes can provide a number of useful, dynamic features to personalize your site and simplify updates.
Further Reading and Resources
We have more guides, tutorials, and infographics related to coding and website development:
- Composing Good HTML: this is a solid introduction to writing well-formed HTML and using HTML validator software.
- CSS3 — Intro, Guides & Resources: this is a great place to start learning webpage layout.
- ASP.NET Resources: this guide will get you going with Microsoft's .NET framework for creating webpages.
HTML for Beginners — Ultimate Guide
If you really want to learn HTML, we've created a book-length article, HTML for Beginners — Ultimate Guide And it really is the ultimate guide; it will take you from the very beginning to mastery.