Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Classic asp - When to use Response.flush?

Tags:

asp-classic

We have a painfully slow report.I added a Response.flush and it seems a great deal better. What are some of the caveats of using this method.

like image 763
Brian G Avatar asked Sep 25 '08 19:09

Brian G


2 Answers

If Response.Buffer is not set to true, then you'll get a run-time error. Also, If the Flush method is called on an ASP page, the server does not honor Keep-Alive requests for that page.

You'll also want to look out if you're using a table-based design as it won't render in some browsers until the entire table is sent.. meaning if you have 10,000 rows, the user would still need to wait for all 10,000 rows to transfer before they'd actually see them.

like image 199
Wayne Avatar answered Sep 21 '22 03:09

Wayne


Expanding Wayne's answer: if anything you do needs to set Response.Headers, you can't do it after any part of the Response has been Flushed.

like image 38
Nikki9696 Avatar answered Sep 22 '22 03:09

Nikki9696