http - How does XMLHttpRequest know when to invoke its callback? -


What I think, if the client-side JavaScript code uses XMLHttpRequest to make POST requests, then it's a response Waits for and fulfills that it prepares the prepared station to prepare it. Invites full and callback function.

My question is, how does it decide that the response is complete? Does it return the contents of the first TCP packet? Or does the server shut down the TCP connection to complete the transaction? Or is there something special in TCP packet material that tells the XMLHttpRequest object that the response is complete?

This waits for either to close the connection to the server, or until the content in the response- By the same reaction as the length header, many bytes can not be read, then he waits.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -