The Basic Uses of SSI - Get Articles by Sean Burns

Get Articles
 
  

submit your own reprintable article

Article Categories

Accepting Credit Cards Online
Accounting and Book-Keeping
Advertising
Affiliate and Associate Programs
Articles and Article Promotion
Autoresponders and How To Use Them
Bonuses and Freebies
Branding
Business Ideas
Business Practice
Communication Skills
Competition and Your Competitors
Copywriting
Creativity and Ideas
Customer Service and Support
Domains and Domain Names
Due Diligence
E-Commerce
Ebooks and Ebook Writing
Education
Email List Building
Email Marketing
Ethics and Morals
Expert Status
Ezines and Email Newsletters
Family
Forums
Fraud and Scams
Goal Setting
Graphics and Graphic Design
Guarantees
Health
Internet Auctions
Internet Marketing
Investment and Investing
Job and Career
Joint Ventures
Lead Generation
Legislation and Legal Issues
Management and Best Practice
Motivation
Negotiation
Networking
News Releases and Public Relations
Niche Marketing
Outsourcing
Pay Per Click Search Engines
PC Security and Viruses
Pricing and Supply and Demand
Product Creation
Public Speaking
Publicity
Relationship Building
Reprint Rights
Revenue Generation
Search Engines and SEO
Site Stickiness - Getting Repeat Visitors
Software Reviews
Spam - Unsolicited Commercial Email
Statistics and Tracking
Testimonials
Time Management
Traffic Generation - Getting Hits
Travel
Viral Marketing
Web Hosting
Web Site Design
Working At Home - Starting Out
Blank Page
 
Google
 

> Get Articles > Web Site Design > The Basic Uses of SSI

The Basic Uses of SSI


PDF icon Download as PDF

Sean Burns
seanbwebmastersreference.com

WebmastersReference.com
http://www.webmastersreference.com


SSI stands for Server Side Includes. In it's simple form, it means that you can put a tag in your HTML pages that will be replaced by the file that you specify. This is extremely useful and I strongly urge you, whether you are a beginner or advanced designer, to use it. It will save you many hours work later.



The most popular use is to create header and footer files for your site that will contain all of the information that is pretty much standard across all of your pages. Therefore, you don't need to go through every page on your site to add something or change the design of your site, you just change a couple of files and it's done. We use it across our site at <a href="http://www.webmastersreference.com">http://www.webmastersreference.com</a> - only the text that you see in the body of each page is actually created for each individual page. Everything to the left, above and below is pulled from two HTML files that contain all of the information that we use on every page. Therefore, if we re-design the site we just change these two files and our whole site is updated immediately - the whole design can change with a few minutes work even if we have 10 000 pages.



So, how do you use it? The easiest way I have found is to design a template for your pages in your editor of choice. You then decide which parts of this page will be standard across your whole site - this will generally be the top bit (your header) and the bottom bit (your footer). If you have a menu down the left (or ads like we have) this could be an extra file - only if the menu needs to be different on different parts of your site. We include the left column as part of our header because it doesn't change.



You then cut and paste the HTML for these sections to new files called header.html, footer.html and possibly left.html (or whatever you want to call them). Then, in the original page you have created, replace the HTML you just removed with this -



(!--#include virtual="/header.html") -- for the header

(!--#include virtual="/footer.html") -- for the footer

(!--#include virtual="/left.html") -- for the left column (if required).



(Note: the () should be replaced with the <> characters for these codes to work properly.)



Note that you need to call the files from the correct place - if you have put them in your root directory (where your main page is) then what we have here is correct. If you set up a new directory for them, you will need to reflect this.



Now, the original page that you have created will generally need to be saved with a .shtml extension. Generally speaking most hosting companies will set your site up so SSI only works on pages with the .shtml extension. It is possible to make it work on .htm or .html pages but for simplicity, it's best just to go with what your server has already been configured for.



Upload the files to your server, look at the original page that you created in your browser and it should look the way you want. If it doesn't check that the paths to the SSI files that you have called are correct or contact your hosting company to make sure that you can use SSI (if you cant, find a new hosting company).



It is important to note that you probably can't use SSI on pages generated by a CGI script - unless the script can generate pages with a .shtml extension. You are, however, able to Include the output of a cgi script in your pages. In fact, you can Include pretty much anything on your site in your HTML pages. You may, on some servers, need to use #include exec rather than #include virtual - this depends on your server. Contact your administrator to find out.



One last tip on SSI. You can Include files within an Include file. This means that, using the above example, you could have (!--#include virtual="/anotherfile.html") -- within the header.html file. It is important to note that you still need to follow your servers "rules" so you may need to change header.html to header.shtml. The most common example of doing this is what occurs on our site - we Include our ad script within our header and footer files. So within header.shtml we have (!--#include virtual="/cgi-bin/centralad/ssirand.cgi.html") -- which generates the ads within the header file that we Include in our pages.



Once again, note: the () should be replaced with the <> characters for these codes to work properly.



There are other uses for SSI - you can include dates, browser info, referrers and so on but what I have described is a good start and will save you a lot of time.



Sean Burns is the author of the WebmastersReference.com Newsletter - <a href="http://www.webmastersreference.com/newsletter">http://www.webmastersreference.com/newsletter</a> . Over five years of experience with site design, marketing, search engine optimisation and income generation is passed on every two weeks to subscribers - hype free. Sign up today for real advice of real value to webmasters.










How useful did you find this article?

Not at all
A little
Averagely
Fairly
Very
 


This article can be downloaded freely from http://www.get-articles.com and used on your website or in your ezine so long as the author is credited and their resource box left intact. You should not change any links in the article, and where the article is used on a website it's links should be clickable. Please see our terms and conditions page for more information: http://www.get-articles.com/authors-publishers-terms.php
 

Get Articles


Top Articles

  • Stop Saving Money!
    By Leo J Quinn Jr
    Rating 138 / 195
  • The Top Ten Reasons For Being Honest
    By Monique Rider
    Rating 152 / 180
  • Top 10 Qualities of a Great Team Leader
    By Naseem Mariam
    Rating 143 / 180
  • 7 M's of Every Highly Effective Manager
    By Alonzie Scott
    Rating 124 / 175
  • Seven "Secrets/Tips" to Becoming a Millionaire
    By Craig Lock
    Rating 97 / 140
  • Five wonderful steps for good presentation skills:
    By Thomson Chemmanoor
    Rating 44 / 75
  • Do Pop-up Ads Work for Your Site?
    By Brian Su
    Rating 41 / 70
  • How to get your audience involved in your PowerPoint presentation:
    By Thomson Chemmanoor
    Rating 27 / 70
  • TOP TEN TIPS FOR PRESCRIPTION SWIMMING GOGGLES
    By Danielle Ross
    Rating 53 / 65
  • Ten Steps to a Power-Packed, Persuasive Proposal
    By Linda Elizabeth Alexander
    Rating 46 / 65
  • Insider Rollout Secrets Review
    By Alex Poole
    Rating 52 / 55
  • The 7 Signs of a Scam
    By Sharon Davis
    Rating 42 / 50
  • How to write a communication plan
    By Matt Eliason
    Rating 38 / 50
  • The MSN Ranking Code Loophole
    By Chris Rempel and Dave Kelly
    Rating 38 / 50
  • 12-Step Foolproof Sales Letter Template
    By David Frey
    Rating 41 / 45
  • Tips For Non-Sexist Writing
    By Tanja Rosteck
    Rating 35 / 45
  • Preventing Fraud On Your Website
    By Aaron Turpen
    Rating 32 / 40
  • Useless Resume Objectives
    By Rita Fisher, CPRW
    Rating 10 / 40
  • Hacker Prevention Techniques
    By Aaron Turpen
    Rating 30 / 35
  • 6 Steps to Great Customer Service
    By Aaron Turpen
    Rating 25 / 35

    May 28, 2012 © www.Get-Articles.com. All Rights Reserved.