SignalR Connection Blocked Until page images load

天涯浪子 提交于 2020-01-14 03:33:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!