Website Babble Webmaster Forums  


Go Back   Website Babble Webmaster Forums > Creating a Website > HTML, PHP, CSS, Javascript & Coding/Programming Topics

Your WB Notifications

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-15-2007, 01:44 AM
siyab's Avatar
Master Babbler
 
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
siyab has a few positive reputation points
Default SSI: to use or not to use?

Hi every body!
I could not find a category for my question so im posting it here.
The question is, should we use Server Side Includes or not? We all know that the page would be displayed badly if some include doesn't work. But many hosts support it. And, do search engines have a problem with .shtml files???
Reply With Quote
  #2 (permalink)  
Old 07-15-2007, 08:15 AM
ncaditya's Avatar
Master Babbler
 
Join Date: Jun 2007
Posts: 192
ncaditya has more than the average amount of reputation points
Default

It is good to use SSI for many reasons:

1) To change the menu on all pages at the same time. If the menu needs to be updated, a single change made can be visible on all the pages.

2) Adding adsense ads. I usually create separate pages like adsense_1.html and add the code to it. Then I php include these where ever needed. If I have to try new ad formats or color combinations, I can edit a single file and check how it performs.

I would recommend php including files as most web hosts support php and have no problems with it.
Reply With Quote
  #3 (permalink)  
Old 07-15-2007, 11:56 AM
lisa's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 7,433
lisa is the Admin and cannot be rated.
Default

I second ncaditya. My site has over 150 pages and it is a wonderful thing to be able to update my left, top, right nav and footer simply by editing one file rather than going in and updating all 150 pages.
__________________
Don't put the cart before the horse.
Plan your website, then create it.

Your Free Guide to Starting a Website
http://www.ThePerfectSiteGuide.com




Reply With Quote
  #4 (permalink)  
Old 07-15-2007, 03:31 PM
Supreme Babbler
 
Join Date: Apr 2007
Posts: 569
webdev has more than the average amount of reputation points
Default

I have done the same for my php site. My site layout is split in 5 components. The header, left menu panel, container or the main content panel, the right panel and the footer. Each component is a single php file that controls its look and feel. i even have ad helper script which i wrote last night that control the ad formats and types. For example i can tell it to display a specific google text or referral ads of any specific ad format. So everything is done through a central place.
Reply With Quote
  #5 (permalink)  
Old 07-15-2007, 03:37 PM
Master Babbler
 
Join Date: Jul 2007
Posts: 284
Bingo has more than the average amount of reputation points
Default

I also use them for every site I have. They make life a lot easier when having to update sidebars etc.

To answer your question if the Search Engines have a problem with it, they dont. The SSI is server as one file when requested from the server.

Give them a shot and see if SSI is for you. My bet is that you wont look back.
Reply With Quote
  #6 (permalink)  
Old 07-15-2007, 08:42 PM
siyab's Avatar
Master Babbler
 
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
siyab has a few positive reputation points
Default

thank you all for your recommendations. I'll try it out
Reply With Quote
  #7 (permalink)  
Old 07-16-2007, 07:50 AM
siyab's Avatar
Master Babbler
 
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
siyab has a few positive reputation points
Default

if you do use SSI, which one would be better?? php or .shtml??
Reply With Quote
  #8 (permalink)  
Old 07-16-2007, 09:19 AM
ncaditya's Avatar
Master Babbler
 
Join Date: Jun 2007
Posts: 192
ncaditya has more than the average amount of reputation points
Default

I think php include would be better. Here is the code to use:

Code:
<?php include('filename.html'); ?>
Reply With Quote
  #9 (permalink)  
Old 07-26-2007, 07:00 PM
Master Babbler
 
Join Date: Jul 2007
Posts: 284
Bingo has more than the average amount of reputation points
Default

I personally use .shtml but dont know if there is any benefits over using .php
Reply With Quote
  #10 (permalink)  
Old 07-29-2007, 05:51 AM
siyab's Avatar
Master Babbler
 
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
siyab has a few positive reputation points
Default

but i do not see any .shtml or .php extension on your websites. Is it possible to retain the .html extension?
__________________
Glad to help

Putting Blogs First - Tips for Kick Ass Blogging
Reply With Quote
  #11 (permalink)  
Old 07-29-2007, 01:02 PM
Master Babbler
 
Join Date: Jul 2007
Posts: 284
Bingo has more than the average amount of reputation points
Default

Quote:
Originally Posted by siyab View Post
but i do not see any .shtml or .php extension
You wont actually see the SSI's when viewing a web page.

You'll have a HTML page and within its code the SSI will reside. Once a visitor requests the HTML page the server brings all the SSI's together to bring you one page, which you have seen.

For example:

HTML Code:
<html>
<body>
 <!--#include virtual="/ssi/header.shtml" -->
 <!--#include virtual="/ssi/navbar.shtml" -->
<p>Your main on-page content</p>
 <!--#include virtual="/ssi/footer.shtml" -->
</body>
</html>
The above page is made up of 4 different files. The header, navbar, footer and the main html page. Once these 4 files are uploaded onto the server and someone requests the html page the server will show all 4 files as one.

Hope that helps.
Reply With Quote
  #12 (permalink)  
Old 07-29-2007, 08:39 PM
siyab's Avatar
Master Babbler
 
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
siyab has a few positive reputation points
Default

thanks Gavin!
__________________
Glad to help

Putting Blogs First - Tips for Kick Ass Blogging
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -6. The time now is 03:51 PM.


 Subscribe to RSS

WB Sponsors

flash chat

Home Jobs Online

Search Engine Marketing

Paid Surveys

Web Design Newcastle

Bookmarking Demon 5



 Subscribe to the Website Babble Feeds

2 Create a Website Homepage | 2 Create a Website Blog


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0