user1278496
user1278496

Reputation: 1066

Embedding a header include into each webpage of my website

Is it possible to have header and footer includes within your normal web pages so that you dont have to repeat so much code on each page?

I know that you can do this with php but what if your building a website purely based in html?

If there is no answer or no way around this, does this mean that I have to repeat my navigation bar code on each page for example?

Thank you for any help

Dale

Upvotes: 0

Views: 125

Answers (1)

No Results Found
No Results Found

Reputation: 102874

There are a couple solutions without using server side includes, but they are pretty bad:

  • Frames/Iframes
  • Load the content with javascript (AJAX request, or store the HTML in the js file)

If you can't use any of these, then yes - you'd have to repeat your code in each file. If server side includes are an option for you, you should just use them.

Upvotes: 2

Related Questions