Home arrow HTML arrow Page 2 - Using SSI to Boost Efficiency
HTML

Using SSI to Boost Efficiency


Have you always thought Server Side Includes (SSI) was too complex? Check out Clay Dowling's tips as he explains some simple SSI directives and how to simplify managing navigation menus.

Author Info:
By: Clay Dowling
Rating: 4 stars4 stars4 stars4 stars4 stars / 9
August 16, 2004
TABLE OF CONTENTS:
  1. · Using SSI to Boost Efficiency
  2. · Enabling SSI
  3. · Simple SSI Directives
  4. · How to Use SSI
  5. · Navigation Menus
  6. · Common HTML Blocks
  7. · Business Considerations

print this article
SEARCH DEVARTICLES

Using SSI to Boost Efficiency - Enabling SSI
(Page 2 of 7 )

If you're using IIS, Server Side Includes are enabled by default for any files with the extensions .shtml, .stml or .stm. 

If you're using Apache, you will need to enable SSI manually.  In your global configuration, add the following:

Options +Includes

This allows SSI to be parsed by the server. To identify which files should be parsed, you also need to inform the server of the new file extension.  If you're one of the fortunate ones using Apache 2.0, the following will do the job:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

If you're like me and still living in the past with Apache 1.3, you need to do the following instead:

AddType text/html .shtml
AddHandler server-parsed .shtml

This pair of directives tells the server that files ending in .shtml should be processed for Server Side Include directives. Because Apache is the ever versatile server, there is another method called XBitHack.  With XBitHack on, files with an executable bit will be processed for includes, just as if the file had the .shtml extension. I haven't used this feature and I have some reservations about marking what is ultimately a text file as executable. This method won't work if you're using Apache under Windows, since the file permission system is too different for an Execute bit to make much sense.


blog comments powered by Disqus
HTML ARTICLES

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials