Hacker News new | ask | show | jobs
by phoboslab 1418 days ago
Pardon my ignorance: Are messages sent through this guaranteed to arrive in order?
2 comments

Yes. SSEs are just an infinite-length HTTP body formatted in a particular way. And like all HTTP bodies, they are guaranteed to arrive in the same order the bytes were sent.
Server-to-client, yes. The moment you write a little chat app that sends every line you type as separate POSTs -- which can be reordered -- you get to keep both pieces.

I wish browsers would support streaming request bodies in the fetch API. That would obsolete WebSockets practically immediately.