5 ms·
I'm glad to hear other browsers work. I am curious about the padding thing. I don't understand what that has to do with SSE. I thought it was just a new prot
by mchahn 11y ago
I'm glad to hear other browsers work. I am curious about the padding thing. I don't understand what that has to do with SSE. I thought it was just a new protocol added to the browser.
- geocar 11y agoSSE is plain HTTP, and might be illustrative to look[1] at the HTTP response directly so that you can convince yourself of this. EventSource is simply an implementation of a parser of those messages. The problem is that MSIE and Chrome often delay dispatching content-received (XMLHttpRequest readyState=3) handlers until a certain number of bytes have been received (or in certain other circumstances, such as in Chrome's native implementation of EventSource). The bytes-received is solved by simply starting with some padding, and unless you need framing you might find it simpler to just use XMLHttpRequest directly. [1]: http://www.html5rocks.com/en/tutorials/eventsource/basics/ http://www.html5rocks.com/en/tutorials/eventsource/basics/