For IE, versions lower then 10, I made a fallback, so the router is not using the pushState, but the hashchange. The initialize method of the router looks like this:
initialize: function(){
var self = this;
Backbone.history = Backbone.history || new Backbone.History({});
var root = "/";
Backbone.history.start({
pushState: Modernizr.history,
root: root,
silent: !Modernizr.history
});
// handle history for old internet explorer
if(!Modernizr.history) {
var rootLength = Backbone.history.options.root.length;
var fragment = window.location.pathname.substr(rootLength) || 'cs';
self.navigate(fragment, { trigger: true });
}
}
Like this the router is working fine both for old IE and for modern browsers, but in IE if the original url looks like this -> http://example.com/lang/page , then the router is navigating to http://example.com/lang/page#lang/page. Is it possible to navigate on first load to http://example.com#lang/page and if it is how to achieve that? Many thanks for your answers!