SignalR - Forever Frame in IE stops working after a few minutes of downtime

I use SignalR in IE9 and, unfortunately, it must degrade before using binding forever.

I spent some time on this with the developer tools in IE. I see how callbacks load into a dynamically inserted IFrame and they call the receive function in the SignalR plugin. However, after about 20/30 of them, it just stops responding - I can no longer call the client script from the server.

I assume that IFrame loading is finally disabled, but no events are raised for this, so I cannot force reconnect.

Has anyone been able to get a reliable SignalR connection working in IE?

Thank:)

+5
source share
4 answers

We had a problem when the Javascript on the website stops working, in particular, we noted this by the fact that Ajax calls will not work. After some investigation, we found that SignalR was the cause of the accident, and we found this post about Forever Frames. We tried to remove Forever Frames support in SignalR with the following code in JavaScript clients:

$.connection.hub.start({ transport: ['webSockets', 'serverSentEvents', 'longPolling'] });

Thus, only "webSockets", "serverSentEvents", "longPolling" are supported.

+8
source

, , , IE9, . , . , IE, , - .

, , , , iFrame , , iFrame . SignalR , onreadystatechange .

+1

According to this, the Github Problem has been fixed in jQuery 1.10.1.

The task was introduced in 1.9.x and fixed on 1.10.1.

Working with jQuery 1.8.1 seems to work too.

Solution: update jQuery

+1
source

Put this in the document ready event, and all your iframe problems will be resolved:

$.connection.hub.start({ transport: ['webSockets', 'serverSentEvents', 'longPolling'] });
0
source

All Articles