3 ms·
You're right, I misspoke. I meant that the "data: " pseudo-header for each SSE message is always included, and repeated for multiple lines (but it's HTTP so can
by manigandham 9y ago
You're right, I misspoke. I meant that the "data: " pseudo-header for each SSE message is always included, and repeated for multiple lines (but it's HTTP so can be gzipped). It's also UTF8 encoded and meant for text while websockets can send the exact binary bytes you need and no more. Either way, it doesn't really matter unless it's a latency-sensitive or high-volume service, but I prefer the simplicity of SSE.
- invisible 9y agoYeah, but packets being able to be maximized to the window size of the connection early on (and being able to have more than 6 "parallel" downloads as a result) is great for initial page loads.