ASP BufferProperty
Complete Response Object Reference Manual
The Buffer property specifies whether to buffer output. Normally, ASP scripts execute on the server side, and the result of each statement is sent to the client's browser for display. When output buffering is set, the server blocks the response to the browser until all server scripts have been processed, or until the script calls the Flush or End method.
Note:If you want to set this property, it should be placed before the <html> tag in the .asp file.
Syntax
| Parameters | Description |
|---|---|
| flag | A Boolean value that specifies whether to buffer page output. False indicates no buffering; the server sends output as it processes. In IIS version 4.0, the default is False, while in IIS version 5.0 and later, the default is True. True indicates buffering. The server does not send output until all scripts on the page have been processed, or until the Flush or End method is called. |
Examples
Example 1
In this example, no output is sent to the browser until the loop ends. If buffer is set to False, one line is output to the browser each time the loop runs.
<html>
<body>
<%
for i=1 to 100
response.write(i & "<br>")
next
%>
</body>
</html>
Example 2
<html>
<body>
<p>I write some text, but I will control when
the text will be sent to the browser.</p>
<p>The text is not sent yet. I hold it back!</p>
<p>OK, let it go!</p>
<%response.Flush%>
</body>
</html>
Example 3
<html>
<body>
<p>This is some text I want to send to the user.</p>
<p>No, I changed my mind. I want to clear the text.</p>
<%response.Clear%>
</body>
</html>
Complete Response Object Reference Manual Other Extensions