Server-Side Includes (SSI) is a time-tested technology that allows web developers to insert the contents of one file into another. For users of Adobe Dreamweaver, mastering SSI is a powerful way to manage repetitive website elements like headers, footers, and navigation menus across hundreds of pages simultaneously.
By offloading this process to the server, you ensure consistency, reduce file sizes, and dramatically cut down on maintenance time. Understanding Server-Side Includes (SSI)
An SSI is a directive written directly into an HTML page. When a user requests that page, the web server processes the directive, fetches the included file, and injects its content before sending the final page to the user’s browser.
The most common syntax used for an include is:
Because this happens on the server, the end-user never sees the include code—only the compiled HTML. To use SSI, your web server must support it (Apache and IIS both do), and your files typically need a .shtml, .stm, or .php extension, though servers can be configured to parse standard .html files for SSI as well. Why Use SSI in Dreamweaver?
While Dreamweaver offers its own proprietary Templates (.dwt) and Library Items (.lbi) to manage repeated content, SSI provides several distinct advantages:
Instant Updates: When you update a Dreamweaver template, Dreamweaver must open and rewrite every single HTML file locally, which you then have to re-upload. With SSI, you update just one file, upload it, and the entire site changes instantly.
Server Independence: SSI is a standard web server technology. Your code remains clean and functional even if you move away from Dreamweaver to another code editor.
Reduced File Size: Because repetitive code is stored in separate files, your individual page sizes are smaller, making local management cleaner. Step-by-Step: Implementing SSI in Dreamweaver
Dreamweaver makes it easy to insert and visually manage SSI files without writing code from scratch. Step 1: Create Your Include File First, isolate the code you want to repeat. Create a new document in Dreamweaver.
Paste only the HTML snippet you need (e.g., just the
Leave a Reply