SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Oct 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Include html file in html using client side language

    I have a file index.html which I want to separate the header and footer in header.html and footer.html and include them in index.html. How can I do this?

    I have searched in google. They said I can do it using javascript. But I can't able to make a working solution. Please help.

    Thanks.

  2. #2
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,516
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    The best and cleanest approach would be to do this with a server-side language. Is there a reason why you can't do that?
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    SitePoint Member
    Join Date
    Oct 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Every server supports server-side language? I mean I am new in server knowledge. Can you please explain. Thanks

  4. #4
    SitePoint Member
    Join Date
    Oct 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about Node.js as server?

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,592
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by coredveloper View Post
    What about Node.js as server?
    I'd say keep it simple. Most hosts support PHP, and PHP makes this extremely easy. Here is a simple way to do it.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •