Do I need to pass back any HTTP headers to tell the browser that my server won\'t be immediately closing the connection and to display as the HTML is received? Is there anyt
Long polling is a common technique to do something like this; to briefly summarise, it works as follows:
The client sends an XHR to the server.
The page running on the client receives this data, and does what it does with it.
This is how Facebook implements its chat feature.
This article also clears up some of the misconceptions of long-polling, and details some of the benefits of doing so.