在 SignalR 的客户端事件(javascipt 函数)中,我使用 sammy.setLocation("#xxx"); 但 IE10 导航到一个以 SignalR 后台请求 [1] 开头的长 url。但 Chrome 工作正常。
var navigating = $.connection.navigatinghub;
navigating.client.navigateInPage = function (url) {
sammy.setLocation("#" + url);
};
我的目标是
http://localhost:30014/#xxx
但 IE10 导航到:
http://localhost:30014/signalr/connect?transport=foreverFrame&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAtb8ox8I2WUGbubMEpY1ojgAAAAACAAAAAAAQZgAAAAEAACAAAABo9BEScEcfj7EykqEQM76utKY8Gykf0zUEfLdN%2Fj26hgAAAAAOgAAAAAIAACAAAAB0nlIDPLRfOgBH%2FltNOm5jURr0%2F%2Blluc4hnaG2wGQ8DTAAAAAJt7I28p7%2Bq5UeTiQXmnfB%2BbsQCgCqomTQKSXxYRt3LPIMq4gRwcscvuj0mTAXb2tAAAAA8QIiSemy27RcO8IuLr%2Feq5VpMSqEK%2BSX29Xvbm48o4yuNKeppsjFwHfmrMjq6eFwH0sFk4X8bbUkgRMZ3Uyjcw%3D%3D&connectionData=%5B%7B%22name%22%3A%22navigatinghub%22%7D%5D&tid=10&frameId=1#xxx