Load content via XHR into #viewer
while allowing
bookmarking. Click on the {a, b, c} links below. Content
should change in the #viewer
and the URL should be
updated. Refreshing the page will load the XHR sourced page.
If the sourced page has been loaded through XHR no site header
will be shown. Viewing the page directly will show a site
header.
#viewer
<li><a href="#!a">a</a></li>
$('a') .bind( 'click', function() { var url = $(this).attr('href').replace('#!', ''); $('#viewer').load(url); window.history.pushState({}, '', url); return false; });