title: history.pushState navigation - what about meta tags - separate template?
body: <p>i have been building a jquery navigation based site without reloads ( using PHP and AJAX ) and have recently come across the problem of page "back", "forward", and "reload" features as well as SEO friendliness.</p>
  
  <p>--<strong>skip this section to get straight to question</strong>--</p>
  
  <p><a href="http://kylepreuss.com" rel="nofollow">my site</a> is currently (not using AJAX but ) loading a single index.php which has several "content" divs, one of which is visible (class="active") while the others are not displayed. When the user clicks a navigation link, a nice animation switches between content divs.</p>
  
  <p>I have apache rewrites to map things like</p>
  
  <p><code>http://mysite.com/about</code>
  to
  <code>http://mysite.com/index.php?page=about</code></p>
  
  <p>where the "about" section would be the one thats displayed by default (while the other "content" divs are hidden). based on this parameter, i include the proper meta tags for the pages. my sitemap has mysite.com/about, mysite.com/blog so that they get indexed as nice separate pages.</p>
  
  <p>However, I've recently decided to make this ajax-based since i plan to incorporate a lot more content and its stupid to load all content on one page. </p>
  
  <p>Note: I'm also now implementing Smarty templates.</p>
  
  <p>I decided to implement hash tags, but saw the inherent SEO problems, then i discovered hashbangs (wth?!) and then found the new HTML5 stuff with <strong>history.pushState()</strong> and <strong>History.js</strong> and have decided to use it.</p>
  
  <p><strong>so here comes the main question</strong></p>
  
  <p>if i have just one page which loads page templates in a content div with ajax, using history.pushState() to modify URL and using mod_rewrite and a PHP back-end that can serve a default content template in the case of a direct request like "mysite.com/about" (mysite.com/index.php?page=about) (for basic useabilty and SEO), i cannot also set meta content for direct requests unless i have two templates - a content template - and a meta template? is there another way around this?</p>
  
  <p>are tags like <code>&lt;title&gt;</code> and <code>&lt;meta name="description"&gt;</code> important enough to warrant having a template especially for them?</p>
  
  <p>in summary, i want my nice mod_rewrite URLS to pull up on google with the correct title and meta description for a particular ajax-loaded page content template.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>i'm going for pretty much the same thing they have going on here at <a href="http://hypem.com" rel="nofollow">hypem.com</a>. they have an event listener which changes the <code>&lt;title&gt;</code> tag when new content is listed. they also serve the correct <code>&lt;meta name="description"&gt;</code> tag, but only if it is a direct request to one of the main pages, like blogs - other pages, like <a href="http://hypem.com/blog/indie+today/10332" rel="nofollow">http://hypem.com/blog/indie+today/10332</a>, return the meta tag for the main blog page, and only when directly requested</p>