Results 1 to 2 of 2

Thread: Response.Buffer

  1. #1
    Jon Banta Guest

    Default Response.Buffer

    O.K. I have seen the &#039response.buffer = true&#039 on some sample script, but what does it do? Is there a way to change the buffer size. What is the bootlean statement enabling? Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: Response.Buffer

    The scenario of IIS and ASP is like this:<BR><BR>Client requests ASP page<BR>IIS realizes this, and parses the ASP page through asp.dll<BR>Asp.dll converts the ASP to HTML<BR>IIS streams this converted HTML to the client<BR><BR>So, let&#039s say that you have an ASP page that takes five seconds to run fully. Well, by default Response.Buffer is set to false, so asp.dll does NOT buffer the HTML output. So, you will see the HTML arrive as it is processed.<BR><BR>Try something like this:<BR><BR>&#060;%<BR>Response.Buffer = False<BR>Response.Write "Hello"<BR><BR>&#039Do something that takes a while (a complex db query, for example)<BR><BR>Response.Write " World!"<BR>%&#062;<BR><BR>Now, load the page. You&#039ll note a delay from when you see Hello and when you see World. This is because the HTML for Hello is known before World, and you did not buffer the HTML output, so it was sent to the client as it became available.<BR><BR>Now, set response.buffer = True. Rerun the script. Now, you see Hello and World at the same time. NO HTML is sent to the client until the ENTIRE ASP page is finished executing (or a Response.Flush is executed...)<BR><BR>Hope this answers your question! :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts