in reply to SSI v dynamic pages

SSI is a dynamic page technology. It's an Apache module, written in C, called mod_include. It is slower than serving static pages, but still quite fast.

mod_perl is also a dynamic page technology. It is also fast, and the Apache::SSI module which implements SSI in perl for mod_perl is just as fast as mod_include.

CGI is another dynamic page technology. It's slow. It has to fork perl and compile your code every time the page is run. It is much slower than SSI.

I don't see how you can do customized pages for each group using SSI, unless you can somehow get the name of the group into an environment variable, maybe using mod_rewrite. You aleady said you can't use mod_perl. That means you're stuck with CGI.

To combat the slowness of CGI, you can pre-generate most of the page. Have the main page and the different prices all generated ahead of time. In your CGI, just look at the user information (you'll need to use cookies or URLs with persistent data in them) and decide which price to show them. Use a simple templating tool like CGI::FastTemplate to stitch the main page HTML together with the appropriate price.

Replies are listed 'Best First'.
Re: Re: SSI v dynamic pages
by kwoff (Friar) on Nov 01, 2001 at 07:54 UTC
    Perrin wrote:
    I don't see how you can do customized pages for each group using SSI, unless you can somehow get the name of the group into an environment variable

    If members of the "group" log in, then it is not too difficult. For example:

    <!--#if expr="${REMOTE_USER} = fancygroup"--> We LOVE you! <!--#elif expr="${REMOTE_USER} = blahgroup"--> Well, okay... <!--#else--> Go away, loser <!--#endif-->

    Any "CGI" environment variable is available like REMOTE_USER. So I think you can get away with using SSI in a lot of cases (though I'd prefer HTML::Mason ;)