|Don't ask to ask, just ask|
Re: Minimizing paths?by swiftone (Curate)
|on Sep 17, 2002 at 13:17 UTC||Need Help??|
(Not really an answer to your question, but others have addressed that, and this is related)
Assuming your main program doesn't do anything user specific, why put the burden of program execution on the user? The sites I work on have their dynamic scripts as scripts, and the bulk of the html generated just as your is, except that I save the output to a branch the webserver serves up.
That didn't sound right. Let me offer an example:
/usr/local/apache/content holds the "content" html just as your /perl/index.html does.
/usr/local/apache/htdocs is where the webserver serves up pages.
My program wraps the content html in headers and footers (as well as running the whole thing through Template Toolkit), then saves the result as an .html somwhere under /usr/local/apache/htdocs/
Thus my users don't have any execution time for "flat" pages, only with actual dynamic content, but my unit doesn't have to maintain the navigation on every page because the build process drops it in place. Our setup is a little complex, with a database holding the relationships between pages, and the build process generating a different local navigation for each page, but you can season to taste.
It's not a concept I can take any credit for, it's been done for a while (Laziness, after all). Template Toolkit ships with a helper program that does something like this, and it's a simple script to do it with most other template systems (I only have experience with Template::Toolkit and HTML::Template, but the concept holds true for anything with HTML output).