I am trying to send some content to the client before doing some lengthy work:
Response.Write("Processing...");
Response.Flush();
System.Threading.Thread.Sleep(5000);
Response.Write("Finish");
Response.End();
In Firefox it works as expected but in IE8, Safari and Chrome it waits until all the code is processed and then shows the whole text.
I have tried sending a better formed HTML like the below sample but I get the same results:
Response.Write("<html><head><title>test</title></head><body>Processing...</body></html>");
Response.Flush();
System.Threading.Thread.Sleep(5000);
Response.Write("Finish");
Response.End();
Thank you!