|
Article:
What the Heck is Server Side HTML? by: Robert Plank If you're stuck in the dark ages and are still editing the pages of your web site by hand, there's an easy way to change the look of your web site on a moment's notice, by editing only one file. I know, there are all kinds of brand new blogging scripts, forums, CMSes, and other stuff to make your site easy to update. But on the other hand there are just as many desktop-based programs that churn out thousands of static HTML files for you to put on your server. What do you do when you have to change these files later? Edit them by hand, one at a time? I don't think so. You can save a lot of time down the road using Server Side Includes (SSI). The point of using Server Side HTML is so you can include other pages on your regular HTML pages, things like a list of links you regularly update OR a header and footer. Try it out. Take one of those static HTML pages on your site and rename it to something like 'filename.shtml' instead of 'filename.html.' All we've done is changed the 'html' at the end to 'shtml.' Now, take the part of that site you want to appear on every page (the header graphic, link sidebar, etc.), copy and paste that part and save it into a file named 'header.shtml.' REMOVE that text from your filename.shtml file. Now, in the filename.shtml file, place this at the top: [!--#include virtual='/header.shtml'--] (IMPORTANT: Replace the brackets [ and ] above with the greater-than and less-than 'HTML' brackets... hold shift and press the 'comma' and 'period' keys on your keyboard.) Upload filename.shtml and header.shtml to your server and load header.shtml. If everything went well, the page should look exactly as it did before. The only difference is: you only need that one 'include virtual' line to show the top of the page, AND to change that top HTML later on all you have to do is edit header.shtml. If you had this sort of code on '20
|