Search code examples
javascriptinternet-explorerbackbone.jspushstatebackbone-routing

Backbone Routing in IE - Get rid of the # sign?


Is there any way to stop # from appearing inside the address bar when using Backbone routing, pushState or not?


Solution

  • Current versions of IE do not support pushState. (It appears in the IE10 previews).

    Your options are either to drop down to normal (non-Ajax) links / form submissions / etc, or use the hashbang hack.

    I don't know backbone well enough to say for sure, but the following might be sufficient to fallback to normal routing:

    if (window.history && window.history.pushState) {
        Backbone.history.start({pushState: true});
    }