View Single Post

  #1 (permalink)  
Old 27-08-2008, 09:11 AM
askaboutfood.ie askaboutfood.ie is offline
Frontpage User
 
Join Date: Aug 2008
Posts: 16
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
askaboutfood.ie will become famous soon enough
Default Reusing common html code on multiple pages

Hi,

I'm pretty new to HTML, so bear with me.

I'm working on a standard problem - I have multiple html pages with common content (header and footer). I want to have to update this common information in one place only.

My web research has lead me to SSI's and Javascript.

The SSI solution looks neat, but requires a new directive in my .htaccess if I want to hide the fact them I'm using SSI's (which I think I do). Also, this leads to an overhead on the part of the web server.

The JS solution also looks neat - embed the html within a document.write command in a text file and call this as a script from wherever I want to use it.

Question is: Am I missing something in either of these approaches (other advantages/disadvantages). Also, is there another (better) solution that coders prefer to use?

Thanks,
jomag
Reply With Quote