-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xdr-streaming connection closed on "javascript:;" in IE8 #90
Comments
Wow, IE will never stop amazing me. I can reproduce that in IE9. Frankly - I doubt there is a quick workaround. I guess that clicking on The same seem to happen to 'iframe-xhr-polling' transport. I guess XDR / XHR just gets killed when user clicks on I'm not sure if we can do anything about it - sorry. Maybe try using There seems to be related SockJS bug - SockJS doesn't seem to trigger |
Thanks for quick reply. We see the same problem when using Faye. |
cant reproduce with IE8 and with XDR |
@tomaszdurka Socket.io uses flashsockets on IE by default, right? You're sure you're testing when it's on XHR/XDR transport? |
@Yaffle You're sure you get messages echoed back after clicking the link? |
@majek, i tested with XDomainRequest with my own page and server, not with SockJS |
Tests were based on socket.io chat example. We've tested both |
@Yaffle Thanks, that was actually quite helpful. @tomaszdurka Okay, it is SockJS misbehaviour. Quick fix: find this line in
Explanation: SockJS actively cleans up connections on page reload. This is in order to avoid memory leaks in some browsers (firefox is know to leak websocket objects, IE leaks pretty much everything). Apparently |
The online demos use released SockJS version, so no, you can't test it |
Yes, we have commented that out and works for Thanks again. |
Are you sure the iframe is using the modified sockjs.js file? You need to change that on the server side (see |
You are absolutely right. Am quite new to SockJS and completely forgot about this property. Confirmed - this fixes the issue for |
Hey Marek, I've been looking into the socket.io code and they seem to attach that Maybe this can point some more flexible (to us) solution. If you not plan to implement any adjustments please let us know what is your reasoning. |
Thanks for the socket.io link, interesting. I think I'll drop attaching to IE: I believe it's fairly safe to remove the line I suggested earlier. |
Seems like this is close-able? |
the note "Don't use "javascript:" links on a page that uses SockJS. For some reason clickling on this type of link breaks XDR/XHR requests on IE (see #90)." should be removed from README |
We're having an issue with xdr-streaming transport under IE8 while using
<a>
elements withhref="javascript:;"
.Reproduce steps:
http://localhost:9999
- should work fine.<a href="javascript:;">Break connection</a>
<a>
elementResult: Connection is closed.
Actually any
javascript: ...
code withinhref
attribute will break the connection. Is this known issue? We can workaround it, but would be great if we could keep those hrefs as they are right now.The text was updated successfully, but these errors were encountered: