0

On a web site (javascript on front-end), I subscribe to another web site events through a (url) which returns Chunked data .

I want to read and parse only the delta (=new) portion of data received and not all the accumulated content.

Any clever way to do that ? Below my code running well but displaying "all accumulated value"

var xhr = new XMLHttpRequest()
  xhr.open("GET", url, true)
  xhr.onprogress = function () {
    console.log("PROGRESS:", xhr);
}
  xhr.send()
user2606148
  • 49
  • 1
  • 5
  • 1
    what does that mean? i dont know what data is returned or anything? i dont know how the data is "chunked". i don't know how you're trying to "parse" the data.. too many questions. – I wrestled a bear once. Feb 13 '18 at 21:43
  • Are you trying to compute upload/download progress of a file? or get the response from the server? – CodeLover Feb 14 '18 at 01:09
  • Chunked stream remains open and send data when they arrive. These data are individual events and I just want to display THIS event and not all the accumulated flow. – user2606148 Feb 16 '18 at 11:41

0 Answers0