IE11 SSE Over Polyfill Never Terminate Connections?

I have been playing around with Server-Sent Events and the equivalent Polyfill for IE and everything works fine with one glaring exception. When I close the tab / browser or reload the page, the connection between client and server stays open indefinitely, as my SSE server example pushes content every 5 seconds. To make matters worse, I can hit a reboot and get a new connection every time, which is a potential benefit of a DOS attack on the web server as I can create a large number of connections that never close. Browsers that support SSE or even those that rely on Polyfill (excluding IE) do not exhibit this behavior.

Sample server I'm using: https://github.com/kljensen/golang-html5-sse-example/blob/master/server.go

What this webpage serves: https://github.com/kljensen/golang-html5-sse-example/blob/master/templates/index.html

And I added the following polyfill: https://github.com/Yaffle/EventSource/blob/master/eventsource.js

I get the same behavior with a number of other polyfills and server implementations. I can loop through the traffic and see how the server's TCP connection continues to send data and return ACKS from the client after IE closes (at least 10-30 minutes, most likely longer). From IE debugging, it seems like the call xhr.abort()

never cancels / closes the connection.

I've seen similar complaints about xhr abort in IE in questions like this

I am wondering if anyone else has such a problem. From SSE research, almost all sources say you can use Polyfill for IE / unsupported browsers and everything works great, but that seems like a pretty serious flaw and I'm surprised there seems to be any information on this particular issue.

+3


source to share





All Articles