问题
this is my signalr hub connection :
  chat = $.connection.chat;
  $.connection.hub.start().done(function () {
     // problem is here 
     // this part is waiting for full page load.!
  });
why signalr connection waits for my page contents to load complete?
i have a <img src='BAD SERVER'/>sometimes take 2 minutes to load successfully.
and the connection is waiting for images loaded.!
how can i fix this problem ?
回答1:
Try this:
chat = $.connection.chat;
$.connection.hub.start({ waitForPageLoad: false }).done(function () {
 // problem is here 
 // this part is waiting for full page load.!
});
来源:https://stackoverflow.com/questions/33783480/signalr-connection-blocked-until-page-images-load