Home • Client Resources

What is an include file and why is it useful?
An include file is a single file that contains a part of a web site.

"Part of a web site"? What does that mean?
The include file contains a part of a web site that is common to every page on the web site. Typically this means a navigation menu or a footer area of a web site. So, an include file can be a navigation menu, or a header, or a footer.

Why is this useful?
If you have a big web site, and need to edit the navigation menu, then you can edit the navigation menu in one place only — in the include file. Then you upload the edited include file and voilà, the edited navigation menu appears throughout the entire site. There's no need to edit the navigation menu on every page.

Also, this means that your navigation menu is absolutely consistent on every page of the site, which means it is easier to maintain and easier to use.

Typical uses for an include file:

What's the limitation?
An include file cannot have variation across pages. Meaning, the file cannot appear one way on one page, and another way on another. It is a single file that appears on every page of the web site, is easy to edit, and is consistent.

N.B. In a database driven web site, I can use ColdFusion variables to create some variation in a navigation menu, such as a You Are Here highlighting effect on navigation menu items.

This web site uses ColdFusion templates for its header and footer files. These ColdFusion templates have the same function as include files. Typically, the term "include file" applies to Linux / Apache web servers.