I created a page in ASP.Net that does the following:
Output line #1
{wait 1 second}
Output line #2
{wait 1 second}
Output line #3
.....etc
If I browse to the page, you can see that the response comes back as a STREAM, as it happens. (Note you can only see this the SECOND time the page is loaded in IE)
When I use XmlHttp in IE, the response only comes back when the WHOLE page is done. However, in other browsers, it works as expected. The onreadystatechange raises the event in my JS callback function when the document is complete, but FireFox raises it for each FLUSH, which is the effect I need. I would like to know if anyone else can make IE XmlHttp object do the stream.
Example code: (C#)
private void Page_Load(object sender, System.EventArgs e)
{
Response.ClearContent();
Response.BufferOutput = false;
Response.Write("Output line #1<br/>" + CRLF);
Response.Flush();
System.Threading.Thread.Sleep(1000);
Response.Write("Output line #2<br/>" + CRLF);
Response.Flush();
System.Threading.Thread.Sleep(1000);
//etc..
Techniques I have tried:
1) Asynch Http Module - the module worked, but the client side still did not
2) JavaScript work arounds:
a) Polling
b) Remote Scripting (this works, but must use a GET, and so is not as secure)
c) Timeouts (too many requests)
3) HTA - also works, but only on IE
Any help would be appreciated!