1

How do I change the browser URL (or URI) without a page refresh using HTML5 and HTML5Shiv for IE? For instance if I am on the page http://www.example.com and I want to go to http://www.example.com/4f6gt without having to reload the page. I understand how to load the content with AJAX, I have been using AJAX for a while now, but I am new to the HTML5 point of view for this. The reason I wanna do this is because I wanna be able to have people navigate pages without the time it takes to reload the DOM of the main page, but have a deep link that they can also go to so they have a one step way to get back. Thanks!!

comu
  • 921
  • 1
  • 11
  • 29

1 Answers1

3

Check out pjax or history.js

It's not going to work in < IE9, because IE doesn't support html5 history api (history.pushState() and history.replaceState()). The shim won't help. Should work in IE10.

Both those plugins degrade gracefully. History.js can also degrade with a hashbang to support dynamic content loads.

Christian
  • 19,605
  • 3
  • 54
  • 70