title: Dynamically change div content, while parts of the page remain static, and also allowing for direct access to whatever content (think bookmarks)?
body: <p>First off, this site has helped me immensely through some school projects, and I hope my question is specific enough for some answers.</p>
  
  <p>What I'd like to do is change the content of a div on my page (lets call it '#content'), while also somehow allowing for direct access to the various "pages" that would be created by changing the div's content.</p>
  
  <p>For example, lets say that "foo.com/home" is to be the home page.  The '#content' div would need to get filled with the code for the home page, while the other elements around it remain static (such as the header, footer, and navigation divs).  Likewise, "foo.com/forum" would fill '#content' with the code for the forum, and other pages would do the same.</p>
  
  <p>Currently, I'm simply checking the hash at the end of the URL, and then using jQuery's load() method to load my various code into '#content.'  However, in addition to the fact that using the hash for navigation seems finicky on mobile browsers, it also just <em>feels</em> wrong to me.</p>
  
  <p>I was thinking of using PHP, and then just using PHP includes to change what code is loaded into '#content' based on the URL.  For example, "foo.com/page=forum" would fetch a page that is the same (layout wise) as the home page (header/footer, navigation, etc.), but would just include a different file for '#content.'  However, this will reload the ENTIRE page, and not just '#content' right?</p>
  
  <p>Ideally, I'd like to use some sort of AJAX call to reload just the '#content' div, but, other than editing the URL hash, I'm not sure how to do this while also allowing for bookmarks and such.  I'd like users to just be able to go to "foo.com/home" or "foo.com/forum" and end up with the "template page" (header/footer, nav) filled in with the correct content.</p>
  
  <p>Again, sorry if this is a poorly worded question.  I've done some research, but can't seem to work out the best way to get this done.  Thanks in advance -- any tips are appreciated.</p>