jQuery ajax long polling
Posted on 2014-02-19
I have an ajax request that does multiple things and I want the browser to react to each stage of the ajax request e.g. the browser show Processing... and waits for the first part of the ajax response, when it receives it then I can add finished to the first processing stage, and then add to the browser window Stage 2 Processing... and the ajax waits for the next response and so on.
I'm not sure if there is an easy way to do this with jQuery or whether I should fire off separate requests for each processing routine.
It's kind of like long polling but not.