WebsiteGear Logo Log In
New User? Sign Up
About | Contact | FAQ
  Home Content Site Development Website Technology Saturday, May 10, 2008 
POPULAR ARTICLES
Nav Subdomain Configuration - How To Setup A Sub Domain
Nav Website Layout - Tips & Tricks
Nav Round Robin DNS Load Balancing
Nav Domain Configuration - How To Setup A Domain Name
Nav Introduction To Server Load Balancing
Nav Server Load Balancing Methods
Nav Tips On Using SubDomain
Nav Breadcrumb Navigation
FEATURED NEWS | POPULAR NEWS
View More News View More News
SPONSORED LINKS
Print| Email| Save| Discuss| Feeds


SSI - Centralize Common Content
Published: Saturday, March 20, 2004


Why use Server Side Includes?

When the number of web pages increase, the complexity of keeping them up-to-date also increases tremendously. For example, if a new link is added to a navigation pane, all the pages, which display the navigation bar, will have to be updated if the nav code is not centralized. Server Side Includes (SSI) are widely used to handle such situations where the common content appears at multiple pages across a web site.

How to use Server Side Includes?

In order to use SSI, the web server should be SSI enabled. Usually all web hosts provide SSI enabled web servers because of its extensive need. The SSI file name extension depends on the operating system and the web server software used by the web hosting server. In most cases, an .htm or .asp is used for Windows based IIS (Internet Information Services) Server, .html can be used for Unix/Linux based servers running Apache. Some hosts may require the use of .shtml for SSI files. Include files can be dynamic pages (e.g. .asp for IIS).

One key point is that SSI is executed before any other server side scripts (except include statement for Java Server Pages). Therefore, you cannot put any server side scripting logic to conditionally include a file. It will always be included.

The code for including a SSI file on a web page is shown below:

<!--#include file="./file.ext"-->


The include file path should be relative to the location of the page which includes it. Here it assumes that the file.ext resides in the same directory as the page.

Using SSI for navigational panels

SSI is most commonly used for header bars and navigational panels of a web site. Using SSI allows the website to centralize the navigational links in one single file, which is included in all the pages of the web site. If a new link is added or any link needs to be updated, the webmaster has to update only this common file and the change is reflected in all the pages which includes it.

For creating a nav include file, create a file and place the html code for the navigational links in that file. For example, a sample include file will look something like the one below with a name "navigation.htm". In order to centralize all include files, place all include files in a separate folder called "/include" under root directory.

<a href="http://www.domain.com">Home</a><br />
<a href="http://www.domain.com/services">Services</a><br />
<a href="http://www.domain.com/company">Company</a><br />
<a href="http://www.domain.com/help">Help</a><br />
<a href="http://www.domain.com/support">Support</a>


Add the include code in each of the web pages that will show the navigation panel. Remember that the place where you add the include code should be the same position where you want the navigation panel to be rendered.

<!--#include file="./include/navigation.htm"-->

Print| Email| Save| Discuss| Feeds
RELATED ARTICLES
Nav Website Navigation Tips
An effective website navigation is very important for your website. Learn tips and tricks.
Nav Favicon - Create Icon For Your Website
A favorite's icon can make your website stand out from the rest. Learn how to create a favicon for your website.
Nav Targeting Usage Demographics to Increase Paid Search Conversions
By understanding usage demographics for the search engines, a web marketer can develop a relevant message and target an ad placement that most effectively connects and converts.
RELATED NEWS
News Post GRAVITY FREE Design Conference Comes to Museum of Science and Industry May 12-14
CHICAGO , May 9 /PRNewswire/ -- GRAVITY FREE: 2008, a design innovation conference featuring 22 internationally known design...
News Post PR Newswire Summary of Technology Copy, May 9, 2008
Following is a summary of high technology news releases transmitted today by PR Newswire. The full text of these releases is...
News Post Microsoft Named Preferred Technology Partner in 'City of the Future' Project
Songdo, a new Korean city currently under construction, will offer ubiquitous technology for citizens, government, education.
News Post u-blox Appoints SmartCore as Brazilian Representative
THALWIL, Switzerland , May 9 /PRNewswire/ -- u-blox, the leading Swiss provider of GPS receiver technology, has appointed Sma...
News Post Pratt & Whitney Rocketdyne Successfully Completes Hot-Fire Tests on Next Generation of Space Launch Vehicle Engine
CANOGA PARK, Calif. , May 9 /PRNewswire/ -- Pratt & Whitney Rocketdyne, a United Technologies Corp. (NYSE: UTX) company,...
Submit News | View More NewsView more news
RELATED CLASSIFIED ADS
Classified Ad Web site design company with High Quality Design
Looking for a web site design company that makes your site attractive and profitable to the interne ...
Classified Ad Cheap Web Design and Graphic Design Services
I am a bachelors degree student of web design & multimedia willing to do designs for a reduced rate ...
Classified Ad Web Design + Logo design
75-Design.net is a new Web Design company offering our customers • Web Design starting at $249.0 ...
Classified Ad web design
New Delhi based seo company offering cheap and affordable web design services. we also offer best ...
Classified Ad Web Design
Sai BPO Services Limitedprides itself as one of the leaders in providing IT enabled outsourcing serv ...
Post Free Ad | View More View more classifieds
RELATED FORUM POSTS
Forum Post Website design in VA/DC area
Hello, Can anybody tell me of a good website design and development company in Virginia/DC Metro ...
Forum Post Website Development-Website Design
I want to start website development & website design company in banglore. Any one tell me what I nee ...
Forum Post Send large files over the Internet
The way people share files over the Internet have been recently changed by some sites like MegaUploa ...
Forum Post Top 10 Ranking Solutions
If you want your site to be noticed, make sure that your site stands in the top 10 rankings in the t ...
Forum Post Free SEO tips
3 years back SEO is very easy process on Google and Yahoo. If we give a correct title on the TITLE t ...
Add New Post | View More View more forum posts


Copyright © 2003-2008 WebsiteGear Inc. All rights reserved.
About | Advertise | Submit Content | Privacy | Agreement | Contact