http long polling is still one of the most funniest hackiest invention ever
Conversation
this is up there with, live stream over gif
1
19
ter explaination
http long polling works by sending a request, and the server only responding once it got a notification, so you would have a http request open for like ages
live stream over gif is just,, keep responding with new gif frames to a gif http request
5
22
Replying to
It was 100% legitimate before WebSockets. HTTP/2 obsoletes WebSockets outside the browser since you can multiplex bidirectional streams over the same persistent connection. WebSockets are now essentially just a workaround for not having access to that from JS in a browser.
Long polling isn't really that far from modern push beyond not being able to reuse the connection.
Standard timeouts prevent it from being as efficient as modern push where polling is throttled back based on reliability of the connection. It can still be pretty efficient though.
2
1
Replying to
Your going to end up with push-to-poll any way since you have to poll to fetch the initial state whenever you (re)?connect
saying http/2 obsoletes websockets sounds like a bit of a stretch, but look at what people actually used it and pushed others to use it for I can see why that can be a conclusion
2


