title: "Redirect" page without refresh (Facebook photos style)
body: <p>I am trying to implement content browsing like it is done on Facebook when user is browsing the photos. I guess everyone is familiar with that photo browsing where you can click "next" and "previous" and immediately get the next or previous photo (you can also navigate using arrow keys).</p>
  
  <p>When you click "next" for example you notice that the page does not refresh - only the content. At first I thought it is done using plain ajax calls which refresh only the "content" in this case the image, description and comments. But then I noticed that also URL in the "Location" toolbar of my browser is changed! 
  I tried to inspect this using Firebug and discovered that when you click "next" only the next photo is downloaded and I still don't know from where the comments &amp; image meta data (description, time, tags,...) are loaded. </p>
  
  <p>Can someone please explain how this technique is done - page URL changes without page refresh (or even without page "blinking" if it refreshes from cache). 
  I know how to change page content using ajax but URL of that page stays the same all the time. If I click on "refresh" button I get the first page again. But not on Facebook since even the "window.location" is changed every time without actual redirect.</p>
  
  <p>The other thing I noticed is that the bottom toolbar (applications, chat, ...) is "always on top". Even if you change the page, this toolbar is not refreshed and always stays on top - it doesn't even "blink" like other pages that are refreshed (either from webserver or from local cache). I guess this is the same technique as above - some kind of "fake" redirects or something?</p>
  
  <p><strong>The Answer is pushState</strong></p>
  
  <pre><code>if (window.history.pushState)
      window.history.pushState([object or string], [title], [new link]);
  </code></pre>
  
  <p>You will smile :)</p>