Question

Server Sent Events seem like a prime candidate for a jQuery plug-in. Page 921 of JavaScript, the Definitive Guide shows how to use EventSource. But then page 923 says that IE uses attachEvent instead of addEventListener.

I found jQuery.EventSource on github, but there's no mention of attachEvent. It instead falls back to using $.ajax.

Q: If I'm going to use the EventSource feature of JavaScript, should I use jQuery.EventSource?

I gotta have more jQuery!

Was it helpful?

Solution

As of today IE9 doesn't support EventSource (Server Sent Events). In the good article by Remy Sharp, there is at the end of the article a list of polyfill solutions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top