Database Reference
In-Depth Information
CGI script, a separate process needs to be created on the server. The API approach
consumes a great deal less memory and performs a whole lot better than running
CGI scripts.
Server-Side Includes (SSI)
When a browser requests for a file, the Web server just fetches the file based on the
URL and simply sends the file over to the browser. Normally, the server just veri-
fies that the user is authorized to receive the file and simply hands over the file
without looking at it.
Typically, graphics are included in the web page and sent to the browser. It is the
browser that scans the web page received, scans and interprets the contents, and
takes action. This process of scanning and interpretation, known as parsing, usually
takes place on the client side of the system.
If the server can be made to do the parsing of the web page before it sends it on
to the browser, then we can make the server take action based on what the server
finds on the web page. Instead of the server blindly passing on a web page to the
browser, the server can parse and interpret the page first. This process of the server
doing the parsing is called server-side include (SSI).
Initially, SSI was used to include other files in addition to the one requested in
the web page sent to the browser. This information to include other files is embed-
ded in the web page. The server parses the web page first, notes the indication to
include other files, and then includes the other files as part of the information sent
back to the browser. Under SSI, generally, the end result conveyed to the browser
is in the form of text.
SSI commands are embedded like comments within regular HTML pages. There-
fore, like comments, all SSI commands begin with the characters <!—# and end with
the characters — >. The following command directs the inclusion of the file con-
taining the current address in a web page:
<!—# include file
=
“currentaddress.htm — >.
Embedding SSI commands as comments makes it easy to implement SSI. HTML
pages with SSI commands are still portable. Any server that does not support SSI
does not parse and interpret the commands; it simply passes on the commands
to the browser; the browser simply ignores the commands as though they are
comments.
Each vendor of Web servers may implement SSI in a proprietary fashion. There
is no standard governing SSI; each vendor is free to implement SSI as it chooses.
However, most vendors follow the basic SSI specifications outlined by NCSA, which
maintain these general rules.
As you have noted, with SSI, you can include files in a Web document. But SSI
can accomplish many other actions. You can include special commands to report
the size of a file or the date when it was last modified. You may require the current
date to be presented. You may embed a special command to send an e-mail to a
given address.
Although you accomplish a number of different actions with SSI, what we are
interested is database integration with the Web and how SSI enables this integra-
Search WWH ::




Custom Search