I have referenced below two libraries dynamically in my page. When I browse my application below mentioned error did not come in Chrome browser. But in Internet Explorer the error occurs.
var signalRLibrary = document.createElement('script');
signalRLibrary.type = "text/javascript";
signalRLibrary.src = 'jquery.signalR-2.1.2.min.js';
document.getElementsByTagName('head')[0].appendChild(signalRLibrary);
var signlaRHub = document.createElement('script');
signlaRHub.type = "text/javascript";
signlaRHub.src = "~/signalr/hubs";
document.getElementsByTagName('head')[0].appendChild(signlaRHub);
During page load I got below error as SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js.
if (typeof ($.signalR) !== "function") {
throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js.");
}
Your problem is that, somehow, the order in what you are loading the references is wrong.