Forum Moderators: phranque

Message Too Old, No Replies

SSI's

         

jk3210

12:27 am on Nov 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've been using FrontPage's Include component on a 6,000 page site, and it has reached its limit on usability. Updating a footer, for example, takes 42 minutes.

How does it work with SSI's? If I understand their operation correctly, there shouldn't be any delay at all, right?

Thanks

abbeyvet

1:12 am on Nov 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Correct.

I keep all includes as plain text files, you just change the text file and off you go.

The big issue for you will be changing all the include bot stuff to a simple include command. I have in the past tried to do this with a search and replace and it has always been a mess, I have ended up doing it manually, but not, thank goodness, on thousands of pages.

Also if you don't want to have to change all the extensions on your current files to .shtml - and lose your SE positions and create a heap of bad links - you will need to configure your server to parse .html files for SSI.

jk3210

2:36 am on Nov 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>if you don't want to have to change all the extensions on your current files to .shtml<<

Ugh...I forgot about that. Thanks

keyplyr

5:39 am on Nov 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



jk3210 - Another option that would address your needs, would be to use PHP Includes. Same idea as SSI, but no need to changes page types - although your server needs to have PHP installed, which most do. PHP includes are fast, and as with SSI, there is just one file to update.

  • Create an html file that can reside in a directory that won't be crawled, example: /php/ You can disallow it in robots.txt since this will not be of the aesthetic variety. No need for <html> or <body> tags, just the tags and content that will be put into the webpages.

  • Then just link to that page from the place on the webpages that you wish this content to be displayed.

    Example, a footer:


    <?php include("php/footer.html");?>
  • abbeyvet

    10:10 am on Nov 3, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    My understanding is that with PHP the situation is the same as with SSI - that is, in order not to have to change the file extension from .html to .php you will need to configure the server to parse .html pages as though they were .php, so the same situation pertains.

    It is pretty easy to do this, but it really depends whether or not your host makes it easy.

    There is little practical difference between the two but PHP includes have the HUGE advantage that they allow you to include content from another domain, which can be really handy.

    Monus

    12:33 pm on Nov 3, 2003 (gmt 0)

    10+ Year Member



    If you don't want to change the file extensions, but want to use SSI. You can easly add the follow lines in a .htaccess file and place it in the root directory from the web server.

    AddType text/html .html
    AddHandler server-parsed .html

    jk3210

    8:05 pm on Nov 3, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Cool...thanks all.

    keyplyr

    10:52 pm on Nov 3, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



    Unless you use .shtml page extensions for only the pages you wish parsed for SSI, having ALL you pages parsed looking for SSI is definitely a resource hog and depending on the average speed of your server, your pages may take hit with load time.

    On the other hand, PHP includes do not suffer from this malady. I tried them both, and PHP is significantly faster, course everyone has their favorite scripting language.
    In your root level .htaccess:


    AddHandler application/x-httpd-php .php .html

    It may of course depend on how your server is configured.

    buckworks

    11:06 pm on Nov 3, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



    if you don't want to have to change all the extensions on your current files to .shtml

    I've taken to using the .shtml extension for new pages that I think outsiders are likely to link to, whether I'm using includes or not. That way, if I want to use includes later I can do so without messing up links, etc.

    It might not be the most efficient use of server resources, but it makes more efficient use of other resources.

    aus_dave

    11:10 pm on Nov 3, 2003 (gmt 0)

    10+ Year Member



    Another method for includes you may want to look into is adding XBitHack to an htaccess file. More information in this thread [webmasterworld.com].

    Related information is also contained in this post about using If Modified Since [webmasterworld.com].