[X]

Server Side Includes

server side 1995 dead

Directives hidden in HTML comments that the web server acted on before sending the page.

In 2026: Mostly gone. The browser sees a plain comment, which is exactly what you get below, because the server never processed it. SSI was how you had a shared header before anyone had a templating language, and it usually needed the file renamed to .shtml.

Where it came from: NCSA httpd server side includes, 1995. Carried into Apache mod_include. Wikipedia

<!--#include virtual="/inc/header.html" -->

<h1>My Page</h1>

<!--#config timefmt="%A, %B %d, %Y" -->
<p>Today is <!--#echo var="DATE_LOCAL" -->.</p>
<p>This file was last changed <!--#flastmod file="index.shtml" -->.</p>
<p>You came from <!--#echo var="HTTP_REFERER" -->.</p>
<p>Your browser is <!--#echo var="HTTP_USER_AGENT" -->.</p>

<!-- The hit counter, run as a program on every page load -->
You are visitor number <!--#exec cgi="/cgi-bin/counter.cgi" -->

<!--#include virtual="/inc/footer.html" -->
sandboxed demo · breaks nothing but itselfrestart

More in server side

all 6 in server side › · the whole library ›