
07-15-2007, 01:44 AM
|
 |
Master Babbler
|
|
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
|
|
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???
|

07-15-2007, 08:15 AM
|
 |
Master Babbler
|
|
Join Date: Jun 2007
Posts: 192
|
|
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.
|

07-15-2007, 11:56 AM
|
 |
Administrator
|
|
Join Date: Apr 2007
Posts: 7,433
|
|
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.
|

07-15-2007, 03:31 PM
|
|
Supreme Babbler
|
|
Join Date: Apr 2007
Posts: 569
|
|
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.
|

07-15-2007, 03:37 PM
|
|
Master Babbler
|
|
Join Date: Jul 2007
Posts: 284
|
|
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.
|

07-15-2007, 08:42 PM
|
 |
Master Babbler
|
|
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
|
|
thank you all for your recommendations. I'll try it out
|

07-16-2007, 07:50 AM
|
 |
Master Babbler
|
|
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
|
|
if you do use SSI, which one would be better?? php or .shtml??
|

07-16-2007, 09:19 AM
|
 |
Master Babbler
|
|
Join Date: Jun 2007
Posts: 192
|
|
I think php include would be better. Here is the code to use:
Code:
<?php include('filename.html'); ?>
|

07-26-2007, 07:00 PM
|
|
Master Babbler
|
|
Join Date: Jul 2007
Posts: 284
|
|
I personally use .shtml but dont know if there is any benefits over using .php
|

07-29-2007, 05:51 AM
|
 |
Master Babbler
|
|
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
|
|
but i do not see any .shtml or .php extension on your websites. Is it possible to retain the .html extension?
|

07-29-2007, 01:02 PM
|
|
Master Babbler
|
|
Join Date: Jul 2007
Posts: 284
|
|
Quote:
Originally Posted by siyab
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.
|

07-29-2007, 08:39 PM
|
 |
Master Babbler
|
|
Join Date: Jul 2007
Location: Karachi, Pakistan, Asia, The Earth.
Posts: 178
|
|
thanks Gavin!
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
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
|