There are many ways to save time if you're a web designer. Time, after all, is money - and saving time also eliminates some of the more boring jobs when coding with Dreamweaver. Templates and cascading style sheets are two of the most common ways for a web designer to save time. The third is Server Side Includes. While sounding very technical, this is a very easy way to save yourself from repeating information and code when you have a website with 'samey' or repetitive text, images and so on. Since most websites do repeat themselves in places, it's always good to know that there's a small, easy solution.

What is a Server Side Include?

An example - most websites have the same menu bar at the top, or perhaps the same writing at the bottom - copyright information, privacy policy or contact details. Once you've written the code for this, you don't want to repeat yourself for every page in the site. Even if you were using a template, you would still have to make the alterations when uploading the site to the server (giving each 'spawned' page from the template a new file name, for starters). Using a Server Side Include means that all pages are changed simultaneously and you only need to update one page - not them all.

The clue is in the name - you write the code, upload it on the server, and it includes it on the side, without any further input from you, the designer.

How to Use Them

Server Side Includes can be any 'standard' design page - html or asp. Include the code (usually just one line), in the page that you want the code to be operable in (usually all of them, in case of future updates).

Then there's an 'include file' - when you make a change to it, the rest of the pages follow suit, and the beauty of this is that it's at server level, rather than designer level, so you don't have to do any additional work (that's always a bonus, right?). In Dreamweaver, there's a built-in function for this, found under Insert - Server Side Includes. Then choose your include file and away you go.

Some Caveats

Although a reasonably flexible tool, Server Side Includes won't work with any other files apart from HTML or ASP extensions. Also, your include file shouldn't have any of the classic html, head or body tags within it since it should consist of code and code alone, or else the server may read it incorrectly. Another caveat is that with ASP, make sure you're sticking to that extension for security purposes - you don't want to inadvertently create a hole in your security with this little piece of unsecured code. Finally, all the file paths must be relative - but you knew that already, right?

Conclusively, Server Side Includes are never going to replace more advanced coding tools like CGI in webpage design, but it's a useful weapon to have in your Dreamweaver design arsenal.