Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7921791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:43:04+00:00 2026-06-03T16:43:04+00:00

I am creating a small commercial website where I want only the content to

  • 0

I am creating a small commercial website where I want only the content to change, and the header/footer to stay. My goal is to change the content without changing the URL.

I originally was planning to use AJAX but I realized that each page has a different layout so I wasn’t sure how to accompany this. If I were to use AJAX, I would store all the data in XML. In that case, would I have to create a new XSLT for each page? Is there a better solution then this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:43:05+00:00Added an answer on June 3, 2026 at 4:43 pm

    2 main ways :

    1) you can include html in all your pages with a common js file. This is coherent with your initial choice.

    Your fonction could be like this (supposing you use jquery, which I recommend) :

    // that's in the js file
    function addHeaderAndFooter() {   
        var html = '<div id=myheader>header stuff</div>';
        $(html).prependTo('body');
    }
    

    You then would call it like this :

    // that's in each html file
    $(window).load(function(){
        addHeaderAndFooter(); // that's your function defined in your common js
    });
    

    2) a server side generation system : With PHP for example it’s easy to include constant elements in all your pages. Fact is that very few commercial sites can really avoid the use of server side generation.

    Usage of XML and XSLT is possible but not so frequent today as it is heavy and not human friendly.

    It’s hard to say without more requirements if you should use solution 1 or 2, but for somebody not really versed in hardcore developpement and supposing your site will have more that 3 o 4 pages, I’d recommend to use something like PHP : it’s more classical.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use Angular routes for creating small website for mobile. Is there
I am creating a small commercial web project running Apache/WSGI/Django/MySQL. I have a development
I have a task to create a website that'll allow creating small websites, mostely
I'm creating a small car dealership website, and on my inventory page I need
I am creating a small website that allows a user to browse some of
I have question about pattern Table data Gateway... I´m creating small project, only for
I am creating small django application which holds some few questions (and answers for
I am creating a small game for students, and in a place, it has
I am creating a small application which will perform say 4 different, time consuming
I am creating a small (for now) stored procedure to insert some data. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.