response.buffer - true or false

S

Stephanie

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.
 
S

Stephanie

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.
 
D

Dave Anderson

Stephanie said:
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.
 
R

Ray Costanzo [MVP]

Can you post some sample code that would allow us to try to duplicate the
behavior?

Ray at work
 
S

Slim

Ray Costanzo said:
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
 
S

Stephanie

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
 
S

Stephanie

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top