5

I have an ASP.NET MVC page which contains a table, where every row takes some time to load. So I'm calling Response.Flush() after every row is rendered.

IE9 behaves the way it should: displays rows one by one. FF4 on the other hand, displays the page only when it finished loading completely, even though I can see in FireBug's Network tab that the rows are being received one by one.

Is there something I could be doing wrong on the server-side? If not, is there something I can do to my Firefox, so that it displays the page the way I want?

svick
  • 236,525
  • 50
  • 385
  • 514
  • Unfortunately, "fixing" your firefox (if it's an option) won't help a client with theirs ;-) Does FF wait for the *page* to finish or for the *table* to finish? –  May 22 '11 at 20:40
  • @pst, yeah, I realize that. I think it's waiting for the whole page to finish, because it doesn't display anything until the end. The only indication that anything even was received is that it displays the ``. – svick May 22 '11 at 21:46
  • You probably want to google "incremental reflow". – MSalters May 23 '11 at 12:18
  • @MSalters, from the pages I found, it seems this should be working as it is. – svick May 23 '11 at 17:53

2 Answers2

3

I would try using AJAX to fill the table. Maybe a row per call, maybe whole set at once.

Alexander Prokofyev
  • 33,874
  • 33
  • 95
  • 118
1

Consider closing your document with </html> and add the extra rows in script; <script> tags may (in practice) follow </html>. Not a real AJAX solution, not strictly correct, but potentially a lot easier on your serverside.

A similar, but more correct solution would be to insert the script just before the </body>.

See also When does reflow happen in a DOM environment?

Community
  • 1
  • 1
MSalters
  • 173,980
  • 10
  • 155
  • 350