(866) 431-6669 (212) 334-3390

Website Development Articles

SHTML Makes Updating Website Easy

About a year ago, when the client services department told us that the client wants to change an element on the website sitewide, we in the html production department would frown especially if the site happened to be more than fifteen pages. Not anymore! SHTML has made our task so easy that we encourage our clients to make changes, to ensure one hundred percent satisfaction of our clients.

SHTML (Server parsed HTML) is an html document that requires parsing on the server before it is sent to the client browser. All the normal html tags work exactly same in shtml document. The only difference is that shtml document lets us include other elements into the html document. The extension of such document is as .shtml rather than .html, where S stands for Server Side Include.

Before using shtml, we need to make sure that the web hosting provider supports shtml. If not, the web server needs to be configured to provide support for server side includes. You will find directions on how to configure web server to support server side includes here: http://httpd.apache.org/docs/howto/ssi.html#configuringyourservertopermitssi.

Once you are sure that the web server supports shtml, this is how I use this technology to my advantage.

First, I create the html home page and save it as index.shtml. Then I isolate all the elements that repeat in all or most of the web pages of the website in a separate html documents. I save these documents as .html files. Then, in the main shtml home page, I would replace the code for each repetitive element with an include directive.

For example, let's say the footer is same as in all the web pages of the website. I'll copy the code for the complete section of footer such as the following:

<!-- begin footer -->
<div id="footer">
< a href-"index.shtml">home</a >
< a href-"clients.shtml">clients</a >
< a href-"consulting.shtml">consulting</a >
< a href-"services.shtml">services and technology</a >
< a href-"about_us.shtml">about us</a >
< a href-"contact_us.shtml">contact</a >
< a href-"sitemap.shtml">site map</a >
</div>
<!-- end footer -->

I would paste the above code in a new blank html document and save it as "_inc_footer.html". You can save it with any file name you want. I like to name it starting with _inc because it tells me that this file is an include file.

Then, in all the .shtml web page with the same footer, I'll replace the code for the footer with the following directive.

< !-- include file="_inc_footer.html" -->

That's how simple it is.

Now, when I need to change the file name in the footer, I need to update only _inc_footer.html. Hence, the advantages of using shtml technology to update websites cannot be stressed enough.

Note: please note that after href I have added "-" instead of "=". This is to avoid spiders to get in loop.