Difference between regular HTML and SHTML

Author Topic: Difference between regular HTML and SHTML  (Read 1154 times)

Offline kazi shahin

  • Hero Member
  • *****
  • Posts: 606
  • Fear is not real
    • View Profile
    • Personal website of kazi shahin
Difference between regular HTML and SHTML
« on: August 30, 2010, 12:22:17 AM »
The only difference between regular HTML and SHTML is the extra letter in the extension (.shtml) and this code.

<!--#include file="addedfile.txt" -->

The S stands for 'Server Side Include' or SSI. When an SHTML webpage is sent to the web browser window, it gets assembled on the server and then sent to be viewed. The normal HTML tags all still work the same, the SHTML simply lets you INCLUDE other pieces into the HTML page.
Kazi Shahin                   
092-15-795
Department of CSE   
Cell : 01718 699 590
Blood Group: O+
Google + :  https://plus.google.com/u/0/101741817431143727344/about?hl=en
Facebook : http://www.facebook.com/kazishahin.rahman
Web : http://www.kazishahin.com/

Offline kazi shahin

  • Hero Member
  • *****
  • Posts: 606
  • Fear is not real
    • View Profile
    • Personal website of kazi shahin
Re: Difference between regular HTML and SHTML
« Reply #1 on: August 30, 2010, 12:23:21 AM »
- A Web file with the suffix of ".shtml" (rather than the usual ".htm") indicates a file that includes some information that will be added "on the fly" by the server before it is sent to you. A typical use is to include a "Last modified" date at the bottom of the page.
This Hypertext Transfer Protocol facility is referred to as a server-side include. (Although rarely done, the server administrator can identify some other file name suffix than ".shtml" as a server-side include file.) You can think of a server-side include as a limited form of common gateway interface application. In fact, the CGI is not used. The server simply searches the server-side include file for CGI environment variables, and inserts the variable information in the places in the file where the "include" statements have been inserted.

When creating a Web site, a good idea is to ask your server administrator which environment variables can be used and whether the administrator can arrange to set the server up so that these can be handled. Your server administrator should usually be able to help you insert the necessary include statements in an HTML file.
Kazi Shahin                   
092-15-795
Department of CSE   
Cell : 01718 699 590
Blood Group: O+
Google + :  https://plus.google.com/u/0/101741817431143727344/about?hl=en
Facebook : http://www.facebook.com/kazishahin.rahman
Web : http://www.kazishahin.com/

Offline kazi shahin

  • Hero Member
  • *****
  • Posts: 606
  • Fear is not real
    • View Profile
    • Personal website of kazi shahin
Re: Difference between regular HTML and SHTML
« Reply #2 on: August 30, 2010, 12:25:02 AM »
SHTML stands for Server-parsed HyperText Markup Language. It is a file extension identifying a particular type of HyperText Markup Language (HTML) file. Basic HTML files usually provide the text and formatting for web pages. SHTML files generally perform the same function, but they also allow the use of simple server commands.

The server commands that are issued by SHTML files are performed in a simple computer programming language called Server Side Includes (SSI). As such, another way to define these type of files is that they are HTML files which are enabled to use SSI. In order for a web server to recognize an SSI command in an HTML type file, the file usually must have one of the following extensions: SHTML, SHTM, or STM. This requirement is a function of the settings present on the web server, however. It is possible to set up a web server to recognize SSI commands within files of other types as well.

The main purpose for which SSI is used in web development is to copy additional content from one or more files into another. In SHTML, how to do this is straightforward. Take, for example, a website that has many pages, with each page having different content. A web developer may wish to have a standard portion of text at the bottom of each page, perhaps some company information or a copyright notice. The developer can place the standard text into a file on the web server; the include commands in the SHTML link to the footer file and copy its contents into the resulting web page.

SHTML does have some possible problems. One issue that sometimes arises about SHTML index files is that many web servers are set up to only recognize a specific file name as the index, or home page, of the website. If this file name does not have an extension that is recognized as an SSI-enabled file, then the SSI commands will not be executed.
Kazi Shahin                   
092-15-795
Department of CSE   
Cell : 01718 699 590
Blood Group: O+
Google + :  https://plus.google.com/u/0/101741817431143727344/about?hl=en
Facebook : http://www.facebook.com/kazishahin.rahman
Web : http://www.kazishahin.com/