Parse chunked reply via ajax

Is there any way to analyze the fragmented response via AJAX when getting the pieces?

For example, it is server.com/pingconfigured in such a way that it sends a new fragment with some javascript in it, something like ping(), every 10 seconds, which updates the number on the web page visible to the user. Is there a way to parse individual “chunks” of information through AJAX, mostly without reaching the XHR 4 state?

+3
source share
1 answer

Are you looking for COMET

Alternatively you can check out HTML5 WebSockets

+2
source

Source: https://habr.com/ru/post/1748479/


All Articles