I’m building a Backbone.js app with hash based navigation. It works fine everywhere except IE7. In IE7, when I click on a link that changes the hash, what happens is:
- the page changes
- the hash then reverts to the previous value
- the page changes to the previous page as well
I made the links work by adding saveLocation calls to the controller after loading each page, however when I use the back button or reload the page, it always takes me to the home page instead of going back or reloading the current page.
What can I do to make the back button and page reloading work?
I made some changes to backbone to make it work for me. You can have a look at my repo here:
https://github.com/juggy/backbone
Works for me so far. I dunno if I broke anything else. I inspired myself from YUI and https://github.com/cowboy/jquery-hashchange/blob/master/jquery.ba-hashchange.js .