Results 1 to 6 of 6

Thread: Why shtml?

  1. #1
    Old school, like an old fool. Flying Mullet's Avatar
    Join Date
    Apr 2003
    Location
    Napping in a peach tree.
    Posts
    19,185
    Articles
    6
    Blog Entries
    7
    Contributions
    • Former Administrator
    • Former Cid's Knight
    • Former Senior Site Staff

    Default Why shtml?

    What are the benefits of shtml over html? Either a condensed response or a link to an answer will do. More of a curiosity on my part.
    Figaro Castle

  2. #2
    Prinny God Recognized Member Endless's Avatar
    Join Date
    Aug 2000
    Location
    Prinny Moon
    Posts
    2,641
    Contributions
    • Former Cid's Knight

    Default

    shtml = html + ssi includes; that's pretty much the only difference. And if one really needs ssi, it can be set so that regular html pages can use it.

    And then there is Death

  3. #3
    Old school, like an old fool. Flying Mullet's Avatar
    Join Date
    Apr 2003
    Location
    Napping in a peach tree.
    Posts
    19,185
    Articles
    6
    Blog Entries
    7
    Contributions
    • Former Administrator
    • Former Cid's Knight
    • Former Senior Site Staff

    Default

    Ahh, well that is easier than using a javascript method to write static html to the document.
    Figaro Castle

  4. #4
    ORANGE Dr Unne's Avatar
    Join Date
    Dec 1999
    Posts
    7,394
    Articles
    1
    Contributions
    • Former Administrator
    • Former Developer
    • Former Tech Admin

    Default

    SSI is nice if you want to embed CGI scripts into HTML documents, or include external HTML files into an HTML file. I've never had any use for it other than that. If you have a bit of HTML (a header for example) that a hundred pages on your site all use, you can have each of the pages fetch that header from a separate file rather than having to change it 100 times if you ever update it. So it can be used for a kind of primitive templating system.

    Many hosts disable SSI though because it can be a huge security risk, and if you use it too much it can be a mild CPU hit because you're fetching and building files on the fly every time anyone views your site, though I'm pretty sure most servers nowadays can more than handle it.

  5. #5
    Old school, like an old fool. Flying Mullet's Avatar
    Join Date
    Apr 2003
    Location
    Napping in a peach tree.
    Posts
    19,185
    Articles
    6
    Blog Entries
    7
    Contributions
    • Former Administrator
    • Former Cid's Knight
    • Former Senior Site Staff

    Default

    Yeah, I can see it's benefit for static navigation, headers, footers, etc...

    I would use it for my site but the navigation header and such need to be dynamic depending upon which page is being shown. Is there anyway to pass parameters to these external file or are they pretty much straight html? Right now I call a javascript method at the beginning of my body that writes the header code to the document and depending upon which page "index" is passed in I set that page to selected in a drop down list.
    Figaro Castle

  6. #6
    ORANGE Dr Unne's Avatar
    Join Date
    Dec 1999
    Posts
    7,394
    Articles
    1
    Contributions
    • Former Administrator
    • Former Developer
    • Former Tech Admin

    Default

    I'd use Perl for something that had to be dynamic, but that's just me. Don't know any pure SSI way of doing anything other than "import the text from file x" or "run CGI script x and import the results".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •