JavaScript vs. Server-Side Includes
Christopher Locke
clocke at panix.com
Thu Jun 26 16:45:38 EDT 1997
At 11:52 AM 6/26/97 -0700, "John R. Little" <jrl at acpub.duke.edu> wrote:
>Recently Sam Khosh-khui posted a question about using
>JavaScript to automatically generate the last-modified date
>for inclusion in web pages. Christopher Lock[e] responded
>with a few tips and mentioned that he wanted to use
>JavaScript to replace the similar SSI technique. Chris
>mentioned that the SSI technique "entails a nontrivial
>performance hit on the server."
>
>I don't know how to measure that performance hit but wanted
>to ask if anybody can verify or deny Chris's statement.
as indicated in my previous msg in this thread, there's a very
useful chapter on SSI in O'Reilly's CGI book -- the full text is
online at http://www.ora.com/books/webref/cgi/ch05_01.htm
here are a couple quotes from that source:
"SSI sounds like a great feature, but it does have its
disadvantages. First, it can be quite costly for a server to
continually parse documents before sending them to the client."
"Alternatively, you can set the configuration so that the server
parses all HTML documents:
AddType text/x-server-parsed-html .html
However, this is not a good idea! It will severely degrade
system performance because the server has to parse all the HTML
documents that it returns."
as the latter is exactly what I do to enable SSI datestamping to
work on ALL pages, I would have liked to use the Javascript date
mechanism to get better performance. and this is why i was
disappointed to find this JS function unsupported in MSIE.
>...does anyone have suggestions on how
>I would measure performance and processor demand based on
>SSI vs. JavaScript?
sorry but I haven't Clue One...
after thinking I had posted this to the list (I'd only sent it
to John) he replied in private mail:
>The whole thing is interesting to me because Shishir
>Gundavaram, author of the O'Reilly book you mention, says
>performance degrades. Musciano, author of the article I
>read on SSI and of another O'Reilly book (HTML: definitive
>guide -- <http://www.ora.com/books/webref/html/index.htm>)
>says another. I just wonder which is really right. I'm
>inclined to go with the CGI book author, Gundavaram. But,
>since you say that you already have SSI enabled to parse
>all HTML documents I'd like to get your reaction. Did you
>notice "serevely degraded performance"? And if so, did you
>dis-enable SSI for all HTML documents? Or, were you
>willing to live with it (which might suggest that
>"severely" is too strong a word)?
indeed, this whole discussion has got me curious again as to
which is correct. I do in fact enable SSI for all pages -- this
is at http://www.displaytech.com -- so if the server hit is
minor, I'd feel better. I do suspect though that the Javascript
would be faster -- if only I could count on it working in most
resonably up-to-date browsers, and I know it fails in MSIE 3.02
best
chris
More information about the Web4lib
mailing list