logoalt Hacker News

cousin_ityesterday at 9:44 PM0 repliesview on HN

In my (small) experience, SSE is a bit finicky: 1) Firefox kills a webpage's SSE connection when you close and open the laptop lid, making you write code to reconnect, unlike other browsers; 2) there's no way to see the HTTP status code if something went wrong; 3) proxies can still mess things up sometimes: https://dev.to/miketalbot/server-sent-events-are-still-not-p...

If you have a constant stream of data, SSE does make sense. But if your goal is to have events arriving infrequently or a irregular times, then good old long polling will work in strictly more cases, at the cost of maybe 2x more resources.