Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Usability

Web Design Reference Guide

Hosted by

Web Servers

Last updated Oct 17, 2003.

Web servers are responsible for the server-side action. Apache and IIS, two of the most popular web server options, can handle SSI (server side includes) syntax. SSIs are directives that pull in the contents of another into the HTML page. SSI directives take the following form:

<!--#element attribute="value" -->

When you put code snippets into a separate file, you're saving space because the full code isn't appearing in every file that requires it. Instead, the files requiring the snippet just have a one line directive to call it.

For instance, we put this entire page into a file called optimization.inc. Whenever we want to reference it within an Web page file, we enter the following where we want the file to appear within the Web page file:

<!--#include file="optimization.inc" -->

If this page weighs 10K and we want to include this file in 10 pages, we're saving 90K by having it only appear in one file that's called upon with one line. This is a simple introduction to using includes, as there are more powerful ones that use if / else logic (conditional).

Modules such as mod_perl for Apache also improve downloading speed. Using such modules speed up scripts while reducing server load. Shortening URL links is another way to save space by using the rewrite engine through the mod_rewrite module. See the resources at the end of the section for more details and ways to optimize a Web site through a server.