Flushing servers buffer

Discussion in 'ASP General' started by Andyza, Jul 6, 2005.

  1. Andyza

    Andyza Guest

    In the following code when i = 500 the buffer on the server is flushed
    to the client. However, because the content that is sent to the browser
    contains an html table Internet Explorer does not display the table
    until it receives the closing </table> tag. The question is, am I
    correct in saying that the buffer on the server is CLEARED when i =
    500? It will be empty for a split second until the loop resumes again.
    Am I correct?

    Dim i
    i = 1
    Response.Write("<table>")
    For i = 1 to 1000
    Response.Write("<tr><td>" & i & "</td></tr>")
    i = i + 1
    If i = 500 Then
    Response.Flush()
    End If
    Loop
    Response.Write("</table>")

    Is this a good way to clear the buffer if I'm processing a very large
    amount of data?
     
    Andyza, Jul 6, 2005
    #1
    1. Advertising

  2. Andyza

    CJM Guest

    "Andyza" <> wrote in message
    news:...
    > In the following code when i = 500 the buffer on the server is flushed
    > to the client. However, because the content that is sent to the browser
    > contains an html table Internet Explorer does not display the table
    > until it receives the closing </table> tag. The question is, am I
    > correct in saying that the buffer on the server is CLEARED when i =
    > 500? It will be empty for a split second until the loop resumes again.
    > Am I correct?


    See:
    http://www.intellidimension.com/def...dfgateway/reference/script/response_flush.rsp

    It suggests that a Flush() call clears the buffer...

    CJM
     
    CJM, Jul 6, 2005
    #2
    1. Advertising

  3. Andyza

    Andyza Guest

    Andyza, Jul 7, 2005
    #3
  4. Andyza

    Andyza Guest

    Andyza wrote:
    > The Flush() method requires Response.Buffer to be set to False.


    Ok, ok, I should have read what I posted... The Flush() method requires
    Response.Buffer to be set to TRUE.
    Then when the Flush() method is called the output gets sent back to the
    client.

    >
    > Guess I should have read this first:

    <snip>

    Guess I should have checked the url too! The correct one is:
    http://msdn.microsoft.com/library/en-us/iissdk/html/afd29638-af17-4c29-b285-95e01af7e6cb.asp
     
    Andyza, Jul 7, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric

    Flushing the Buffer in .Net

    Eric, Apr 25, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    658
  2. arnuld
    Replies:
    5
    Views:
    809
    =?ISO-8859-1?Q?Erik_Wikstr=F6m?=
    Mar 18, 2007
  3. Ethan Metsger

    Decorators and buffer flushing

    Ethan Metsger, Feb 28, 2008, in forum: Python
    Replies:
    0
    Views:
    291
    Ethan Metsger
    Feb 28, 2008
  4. tj
    Replies:
    2
    Views:
    161
    Walter Roberson
    May 4, 2004
  5. Nigel

    Problems flushing my buffer! (perl)

    Nigel, Oct 3, 2008, in forum: Perl Misc
    Replies:
    14
    Views:
    248
    Jim Gibson
    Oct 7, 2008
Loading...

Share This Page