More Responsive Buffering in ASP

Despite its many advantages, one of the chief complaints about response buffering the output of ASP pages, is that visitors may perceive your pages as slower than they actually are. This is because the entire page is processed before any rendering takes place.

For many Web pages, this presents no problem, but for lengthier pages, this possible negative perception might seem to outweigh the benefits of response buffering. This may tempt you to turn off buffering, but there's another alternative. You can use the Response.Flush method to send whatever HTML output has been generated so far out to the browser.

In this way, you can send chunks of the page to the browser, increasing its perceived performance, while still leveraging response buffering, and thus increasing its actual performance. The best of both worlds!

Source: Jason Fisher
Viewed 14002 times