I am using the Backbone.js router to fire certain initialization methods when the user hits certain URL routes. So going to /posts/1
via a vanilla anchor tag should fire whatever callback is associated with /posts/:id
in my Backbone router. This works fine in modern browsers when Backbone.history.start({ pushState : true })
is set. However, in IE, users who try to hit /posts/1
will be redirected to /#posts/1
, which is just my home page with a meaningless hash string.
To be clear, I do not need pushState. I am not trying to push URLs to the browser history. I am just trying to read them, then fire a callback, which should be feasible in any browser.
Seems like simple functionality but I am stumped.
Thanks!