Netdrafter: Architects of the Web (SM) About
Home About Services Portfolio Support Contact

Includes (also known as server-side includes or SSI) are commands placed in a web page file that call to separate text or code files before the web page file is displayed by the browser. Elements that are common to a page or multiple pages (a page footer, for example) are taken out of the page, and placed in a separate file. The page file then calls to the external file(s) to get the needed code.

Three reasons to use includes:

1. To save time and effort.
If a global or design element needs to be changed, it need only be changed in the include file, rather than on each and every page.

2. To make file editing easier.
When a file is opened for editing, you will see a minimal amount of code, making text easier to find and page edits easier to make.

3. To prevent unintentional errors.
Since the global page elements are stored separately from the files routinely edited, the chance of an unintentional deletion or damage to a vital piece of code is decreased.

Splitting up a page to use includes:

Include Example Demonstration

Global web site styles are utilized in a similar way using cascading stylesheet (CSS) technology. All style data is stored in an external file, generally called something like “style.css”. Include technology is also commonly used in conjunction with javascript.

Trackback URI » Comments RSS

Leave a Reply

Name:

Email:

Web Site:

Comments:


Other Posts: