First of all, I know there's libraries that provide polyfills for location.pushState
/popState
(History.js, Hash.js, jQuery hashchange), so please don't just link to those.
I need a more powerful library to achieve the following in a RIA:
- User clicks a link
- library is notified and loads context via Ajax (no complete reload!)
- All
<a>
elements are leveraged with a click handler that- prevents page reloads in 2. (
preventDefault
) and - calls
location.pushState
instead / sets location.hash for older browsers
- prevents page reloads in 2. (
- loaded content is inserted in page and replaces current content
- Continue with 1.
Also, previously loaded content should be restored as the user navigates back.
As an example, klick through Google+ in Internet Explorer <10 and any other browser.
Is there anything that comes even close? I need support for IE8, FF10, Safari 5 and Chrome 18. Also, it should have a permissive license like MIT or Apache.
question from:https://stackoverflow.com/questions/11427258/all-in-one-location-hashchange-history-management-library