response.buffer - true or false

Discussion in 'ASP General' started by Stephanie, Jun 21, 2005.

  1. Stephanie

    Stephanie Guest

    If response.buffer is set to true, and no response.flush has been executed,
    is it accurate to expect that my browser should not be rendering the content
    which I (well Ok, someone else) is sending in response.write statements?

    Thanks.
    Stephanie, Jun 21, 2005
    #1
    1. Advertising

  2. Yes.

    Ray at work

    "Stephanie" <> wrote in message
    news:...
    > If response.buffer is set to true, and no response.flush has been

    executed,
    > is it accurate to expect that my browser should not be rendering the

    content
    > which I (well Ok, someone else) is sending in response.write statements?
    >
    > Thanks.
    >
    >
    Ray Costanzo [MVP], Jun 21, 2005
    #2
    1. Advertising

  3. Stephanie

    Stephanie Guest

    GAH - I am seeing something complete else. Response.buffer is certainly
    true. But the content is definitely visible before the page is done
    processing, or even before the next section of writes is done. Oh well, back
    to it.

    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:...
    > Yes.
    >
    > Ray at work
    >
    > "Stephanie" <> wrote in message
    > news:...
    >> If response.buffer is set to true, and no response.flush has been

    > executed,
    >> is it accurate to expect that my browser should not be rendering the

    > content
    >> which I (well Ok, someone else) is sending in response.write statements?
    >>
    >> Thanks.
    >>
    >>

    >
    >
    Stephanie, Jun 21, 2005
    #3
  4. Stephanie wrote:
    > If response.buffer is set to true, and no response.flush has been
    > executed, is it accurate to expect that my browser should not be
    > rendering the content which I (well Ok, someone else) is sending in
    > response.write statements?


    Sort of. There is an implicit Response.Flush() that occurs before Response
    goes out of scope. But otherwise, yes.

    And the reason should be obvious. Since the first content returned MUST BE
    the Status-Line[1]/[2], and that status could be "HTTP/1.x 302 Object
    moved", nothing can be displayed until the script has finished parsing.


    [1] RFC-2616 (ftp://ftp.isi.edu/in-notes/rfc2616.txt)
    6.1 Status-Line
    The first line of a Response message is the Status-Line,
    consisting of the protocol version followed by a numeric
    status code and its associated textual phrase, with each
    element separated by SP characters. No CR or LF is allowed
    except in the final CRLF sequence.
    [2] Sent by IIS when Response.Redirect() is called. See:
    http://msdn.microsoft.com/library/en-us/wininet/wininet/http_status_codes.asp



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
    Dave Anderson, Jun 21, 2005
    #4
  5. Can you post some sample code that would allow us to try to duplicate the
    behavior?

    Ray at work

    "Stephanie" <> wrote in message
    news:%23H%...
    > GAH - I am seeing something complete else. Response.buffer is certainly
    > true. But the content is definitely visible before the page is done
    > processing, or even before the next section of writes is done. Oh well,

    back
    > to it.
    >
    > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > message news:...
    > > Yes.
    > >
    > > Ray at work
    > >
    > > "Stephanie" <> wrote in message
    > > news:...
    > >> If response.buffer is set to true, and no response.flush has been

    > > executed,
    > >> is it accurate to expect that my browser should not be rendering the

    > > content
    > >> which I (well Ok, someone else) is sending in response.write

    statements?
    > >>
    > >> Thanks.
    > >>
    > >>

    > >
    > >

    >
    >
    Ray Costanzo [MVP], Jun 21, 2005
    #5
  6. Stephanie

    Slim Guest

    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:...
    > Yes.
    >
    > Ray at work


    incorrect,

    The page will always render when it finishes loading


    response.flush only comes into play while loading


    The Buffer property indicates whether to buffer page output. When page
    output is buffered, the server does not send a response to the client until
    all of the server scripts on the current page have been processed, or until
    the Flush or End method is called.

    http://msdn.microsoft.com/library/d...html/f13191b2-b941-4c4e-a36f-43e6f3ee2b33.asp




    >
    > "Stephanie" <> wrote in message
    > news:...
    >> If response.buffer is set to true, and no response.flush has been

    > executed,
    >> is it accurate to expect that my browser should not be rendering the

    > content
    >> which I (well Ok, someone else) is sending in response.write statements?
    >>
    >> Thanks.
    >>
    >>

    >
    >
    Slim, Jun 22, 2005
    #6
  7. Stephanie

    Stephanie Guest

    Nope, because I have to do a total take back. I was looking at code that
    generated a bunch of stuff server side, then manipulated it client-side.
    Just between you, me and all of usenet, I would not have done it this way.

    Basically, a bunch of content was generated dynamically on the server and
    send down. Then on the client, it was fashioned into tabs. I would have done
    the tab manipulation also server side. Because of my wicked bias, it took me
    longer to see what was happening. So the content was visible on the client
    because the server had finished processing, but it did not look right
    because the client was still moving it around and hiding and displaying it.

    Thanks for your help, though. It caused me to stop my assumptions.

    Stephanie

    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:%...
    > Can you post some sample code that would allow us to try to duplicate the
    > behavior?
    >
    > Ray at work
    >
    > "Stephanie" <> wrote in message
    > news:%23H%...
    >> GAH - I am seeing something complete else. Response.buffer is certainly
    >> true. But the content is definitely visible before the page is done
    >> processing, or even before the next section of writes is done. Oh well,

    > back
    >> to it.
    >>
    >> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    >> message news:...
    >> > Yes.
    >> >
    >> > Ray at work
    >> >
    >> > "Stephanie" <> wrote in message
    >> > news:...
    >> >> If response.buffer is set to true, and no response.flush has been
    >> > executed,
    >> >> is it accurate to expect that my browser should not be rendering the
    >> > content
    >> >> which I (well Ok, someone else) is sending in response.write

    > statements?
    >> >>
    >> >> Thanks.
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
    Stephanie, Jun 22, 2005
    #7
  8. Stephanie

    Stephanie Guest

    Thanks everyone. See my response to Ray where my assumptions about what I
    was seeing were proved wrong!

    Problem solved by simply hiding the content I did not want shown until the
    client was done with it.


    "Stephanie" <> wrote in message
    news:...
    > If response.buffer is set to true, and no response.flush has been
    > executed, is it accurate to expect that my browser should not be rendering
    > the content which I (well Ok, someone else) is sending in response.write
    > statements?
    >
    > Thanks.
    >
    Stephanie, Jun 22, 2005
    #8
    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. Siemel Naran

    Does true ^ true return false?

    Siemel Naran, Jun 17, 2004, in forum: C++
    Replies:
    19
    Views:
    662
    Chris Theis
    Jun 18, 2004
  2. Pierre Quentel

    "0 in [True,False]" returns True

    Pierre Quentel, Dec 12, 2005, in forum: Python
    Replies:
    59
    Views:
    1,030
    Grant Edwards
    Dec 16, 2005
  3. André
    Replies:
    3
    Views:
    1,586
  4. bdb112
    Replies:
    45
    Views:
    1,341
    jazbees
    Apr 29, 2009
  5. xingye
    Replies:
    9
    Views:
    274
    Michael Lu
    Apr 19, 2004
Loading...

Share This Page