I’m building a progress bar for some long-running server-side tasks (up to a few minutes), and I’d like a way to display the progress of the task. I could use WebSockets or poll on intervals, but I don’t want to keep track of each task. Instead, I’d like to use long-polling and write progress updates to the stream. Here is
Tag: long-polling
polling vs long polling
I got onto these examples showing polling vs long-polling in javascript, however I do not understand how they differ from one another. Especially regarding the long polling example, how does it keep its connection open? This is what the traditional polling scenario looks like: and this is the long polling example: Thanks! Answer The difference is this: long polling allows