Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Advantages of CGI-generated HTML?

1 view
Skip to first unread message

Dave Welsch

unread,
Feb 2, 1995, 6:28:59 PM2/2/95
to
I've seen sites lately that use a complicated CGI script
to generate the pages for the entire site, rather than
just using HTML files.

Is there an avantage to this (performance, security, etc.) that I'm not
aware of? Or is it just fashionable? E-mail me and I'll summarize.

TIA

Dave Welsch ger...@hermes.dna.mci.com
--generic disclaimer applies--

M. Hedlund

unread,
Feb 4, 1995, 12:06:55 AM2/4/95
to
+--- ger...@hermes.dna.mci.com (Dave Welsch) wrote:
| I've seen sites lately that use a complicated CGI script
| to generate the pages for the entire site, rather than
| just using HTML files.
|
| Is there an avantage to this (performance, security, etc.)
| that I'm not aware of? Or is it just fashionable?
+---

Context-sensitivty and logging, mostly.

If you notice that your caller is using Lynx, maybe you could send them
some inlined ascii art instead of a gif. Or maybe you'd like to send
differently-formatted pages to Netscape users (align="right" or
whatever). Take a look at the User-Agent request header (which lists the
browser and version in use), and modify your pages accordingly. The
standards people hate this, for pretty obvious reasons; kind of deflates
the whole point of _standards_, among other reasons. I'm a little more
forgiving of this practice, particularly in the first example above --
Lynx can be pretty bland sometimes, in contrast to graphic browsers. I
like sites that throw some ascii-art or figlet (ascii-art fonts) stuff in
for the text-only crowd. (Doug Stevenson's monthly browser survey, posted
a few days ago, lists Lynx as the third-most popular browser right now.
It's not a small crowd.)

Some other context examples: maybe you want someone to fill out a form,
and you want to fill in the form with some default answers based on
information their browser has already sent you -- From: (email address,
only a few browsers), Remote host: (calling site), maybe a few others --
to save them some typing. Just as easily, your pages could be modified to
reflect the time of day, recent news, your company's stock prices at the
moment, whatever. Maybe you want to generate a list of choices based on
new files in your "press releases" directory, without having to edit HTML
after each release. Keep things from stagnating.

Logging reverses the flow: instead of _sending_ info based on request
headers, CGI scripts can also _collect_ these headers. Doug's browser
survey works that way -- look at the User-Agent: header, and you've
figured out what kind of browser is calling. Look at the Referer: field,
and you can figure out which sites are recommending yours. Look at the
From: field, and you can collect some email addresses of people you know
to be at least slightly interested in whatever you've got on the web.
Obviously, this side of things _can_ be more insidious.

The downside is processor time.

M. Hedlund

Dmitry Mishin

unread,
Feb 5, 1995, 12:28:11 PM2/5/95
to
Dave Welsch (ger...@hermes.dna.mci.com) wrote:
: I've seen sites lately that use a complicated CGI script

: to generate the pages for the entire site, rather than
: just using HTML files.

: Is there an avantage to this (performance, security, etc.) that I'm not
: aware of? Or is it just fashionable? E-mail me and I'll summarize.

Useful one common thing - you are free in your actions:
it can include cgi-level preprocessor, or process User-Agent
fields, or support for this and only this user/host, or save some user
preferences, or anything you like and suit your task. Ideas is more rare,
then realisations.

Performance can't be better in any way.

Security I think the same, but you can show to user only things he's allowed
to use. Probably it's better, then show some menu with many choises, each
follow to same result: "403 Forbidden by rule".

One bad thing is cache. You can cache by client or by proxy working with
normal document, but can't do it with cgi script result. May be possible
to use Expire field, but I'm not sure any software doing this.

D.

: TIA

Jiri Muselik

unread,
Feb 5, 1995, 5:13:43 PM2/5/95
to
pt...@dux.ru (Dmitry Mishin) wrote:
>Dave Welsch (ger...@hermes.dna.mci.com) wrote:
>: I've seen sites lately that use a complicated CGI script
>: to generate the pages for the entire site, rather than
>: just using HTML files.
>
>: Is there an avantage to this (performance, security, etc.) that I'm not
>: aware of? Or is it just fashionable? E-mail me and I'll summarize.
>

Dynamically generated HTML pages are extremely useful when displaying database
contents on the Web. Rather than having thousands of unmaintainable HTML pages,
it is better to use a database (whatever it may be) and display results of searches
dynamically into HTML templates giving the user uniform interface via the Web.

Also, this way - a cosmetic change to the page - such as change in express button
layout or fixing a typo requires only modification of a single HTML file (template).

Cheers,

..Jiri

| / / | / / | / / Jiri Muselik Phone: (613) 763-9435
|/|/ |/|/ |/|/ Electronic Information Systems Fax: (613) 763-9250
| | | | | | mus...@bnr.ca ESN 393-9435 All opinions are mine!


0 new messages