I am trying to send from client to server data using XHR. The data can keep coming in intervals and I do not want to make individual post requests for them as it has issues of too much overhead AND out of order data. Can I somehow do chunked POST using XHR ? Chrome is disallowing me from setting chunked encoding as a header in XHR.
After doing a little Googling, this Google Groups post refers to the same issue:
Looks like not every browser will execute the onreadystatechange event handler multiple times, which is what happens when you get a chunked response from the server. Looks like the readyState should go to 3 when it receives a chunk and execute onreadystatechange, but that might not be happening.
It could also be that each of your chunks aren't quite adhering to the spec. The Google Groups post has more info in the comments.