4 ms·
Based on http://caniuse.com/#feat=eventsource http://caniuse.com/#feat=eventsource only IE/Edge doesn't have it, and there are polyfills for those, e.g. https:/
by drdaeman 10y ago
Based on http://caniuse.com/#feat=eventsource http://caniuse.com/#feat=eventsource only IE/Edge doesn't have it, and there are polyfills for those, e.g. https://github.com/Yaffle/EventSource/blob/master/README.md https://github.com/Yaffle/EventSource/blob/master/README.md
Or there are more problems?
Want to use SSE for one small project soon (haven't used it before, and don't want Websockets as they're an overkill for a basic event stream), would appreciate any info about how things could go wrong.
- taf2 10y agoAgain imagine if MS focused on user experience and used blink / WebKit - instead of rolling their own. We'd have a more standard and open web with fewer set backs. More engineers working on the same engine. A larger team working on a shared native application for everyone to build on for them to sell ads too. It even makes good business sense for them now. One can dream right?
- striking 10y agoEdge has much better battery life than other browsers on Windows, much like Safari on Mac. Neither of those are the best browser, but when my choice is between six or ten hours of battery life, it's easy for me to decide. I dream that one day Webkit / Blink will actually be efficient.
- nacs 10y ago> I dream that one day Webkit / Blink will actually be efficient. Apple's Safari uses Webkit and does get increased battery life on Macs. Theres no reason MS couldn't do the same with Webkit and optimize for battery life using the same engine.
- ocharles 10y agoYea, it's only Edge, but if you look at WebSockets you'll see that everything except Opera Mini supports them - so you can get (some of) the same functionality without polyfills at all.
- drdaeman 10y agoBut why willingly introduce extra complexity to the system? Websockets are way less trivial than SSE. Polyfills for a less popular browser seem to be a simpler solution to the problem, compared to websockets stack everywhere. Even if I don't have to implement websockets on my own and would use some mature library (because bugs happen even in such libraries).
- ssfak 10y agoI believe in the majority of cases SSE are a better technology than web sockets (e.g. WS do not seem to conform to HTTP/2.0, SSE offer transparent (browser-supported) reconnects, SSE event ids allow for replay, etc). The downside is no support in IE/Edge (you can vote at https://goo.gl/bd8V1K https://goo.gl/bd8V1K), no binary content (but again usually JSON is enough) and no fully bidirectional communication. A good talk at the matter can be found at https://youtu.be/NDDp7BiSad4 https://youtu.be/NDDp7BiSad4