he Buffer property specifies whether to buffer the output or not. When the output is buffered, the server will hold back the response to the browser until all of the server scripts have been processed, or until the script calls the Flush or End method.

Note: If this property is set, it should be before the <html> tag in the .asp file

Syntax

response.Buffer[=flag]
Parameter Description
flag A boolean value that specifies whether to buffer the page output or not.

False indicates no buffering. The server will send the output as it is processed. False is default for IIS version 4.0 (and earlier). Default for IIS version 5.0 (and later) is true.

True indicates buffering. The server will not send output until all of the scripts on the page have been processed, or until the Flush or End method has been called.

Examples

Example 1

In this example, there will be no output sent to the browser before the loop is finished. If buffer was set to False, then it would write a line to the browser every time it went through the loop.

<%response.Buffer=true%>
<html>
<body>
<%
for i=1 to 100
  response.write(i & "<br>")
next
%>
</body>
</html>

Example 2

<%response.Buffer=true%>
<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

<%response.Buffer=true%>
<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>

从ASP了解Http Buffer的更多相关文章

  1. Asp.Net异步编程-使用了异步,性能就提升了吗?

    Asp.Net异步编程 写在前面的话,很久没有写Blog了,不对,其实一致就没有怎么写过.今天有空,我也来写一篇Blog 随着.Net4.5的推出,一种新的编程方式简化了异步编程,在网上时不时的也看到 ...

  2. Asp.Net异步编程

    Asp.Net异步编程-使用了异步,性能就提升了吗? Asp.Net异步编程 写在前面的话,很久没有写Blog了,不对,其实一致就没有怎么写过.今天有空,我也来写一篇Blog 随着.Net4.5的推出 ...

  3. 全文检索引擎[asp版]

    search.asp: <% set DM=server.CreateObject("DeepMap.HLL")pnn=0: wdd="": pnn=Re ...

  4. gRPC in ASP.NET Core 3.x -- Protocol Buffer(2)Go语言的例子(下)

    第一篇文章(大约半年前写的):https://www.cnblogs.com/cgzl/p/11246324.html gRPC in ASP.NET Core 3.x -- Protocol Buf ...

  5. gRPC in ASP.NET Core 3.x -- Protocol Buffer(2)Go语言的例子(上)

    上一篇文章(大约半年前写的):https://www.cnblogs.com/cgzl/p/11246324.html 建立Go项目 在GOPATH的src下面建立一个文件夹 protobuf-go, ...

  6. gRPC in ASP.NET Core 3.x -- Protocol Buffer(3)更新消息类型

    当你第一次定义Protocol Buffer的消息的时候,你肯定会给消息设定一套规则需求.但是随着时间的推进,你的业务可能会发生了变化,与此同时,你的Protocol Buffer消息类型的需求也会随 ...

  7. gRPC in ASP.NET Core 3.0 -- Protocol Buffer(1)

    现如今微服务很流行,而微服务很有可能是使用不同语言进行构建的.而微服务之间通常需要相互通信,所以微服务之间必须在以下几个方面达成共识: 需要使用某种API 数据格式 错误的模式 负载均衡 ... 现在 ...

  8. ASP.NET OWIN OAuth:遇到的2个refresh token问题

    之前写过2篇关于refresh token的生成与持久化的博文:1)Web API与OAuth:既生access token,何生refresh token:2)ASP.NET OWIN OAuth: ...

  9. ASP.NET OWIN OAuth:refresh token的持久化

    在前一篇博文中,我们初步地了解了refresh token的用途——它是用于刷新access token的一种token,并且用简单的示例代码体验了一下获取refresh token并且用它刷新acc ...

随机推荐

  1. 影响 PHP 行为的扩展和网络函数

    <?php /* * * 影响 PHP 行为的扩展 * PHP 选项和信息 * * assert_options — 设置/获取断言的各种标志 assert — 检查一个断言是否为 FALSE ...

  2. ng-model和ng-bind区别

    ng-bind has one-way data binding ($scope --> view). It has a shortcut {{ val }} which displays th ...

  3. situations where MyISAM will be faster than InnoDB

    http://www.tocker.ca/categories/myisam Converting MyISAM to InnoDB and a lesson on variance I'm abou ...

  4. jQuery/Javascript 事件停止冒泡

    Demo: <div id='wrap'> <button id='btn'>btn</button> </div> 一般情况下,两个元素分别添加点击事 ...

  5. 深入Python(4):深拷贝和浅拷贝

    一.前奏:熟悉Python内存管理 在Python中,变量在第一次赋值时自动声明,在创建---也就是赋值的时候,解释器会根据语法和右侧的操作数来决定新对象的类型. 引用计数器:一个内部跟踪变量 引用计 ...

  6. angularJs非空校验requied

    <!DOCTYPE html><html><head><meta charset="utf-8"><title>< ...

  7. 11月30日《奥威Power-BI智能分析报表制作方法》腾讯课堂开课啦

    这么快一周就过去了,奥威公开课又要与大家见面咯,上节课老师教的三种报表集成方法你们都掌握了吗?大家都知道,学习的结果在于实际应用,想要熟练掌握新内容的要点就在于去应用它.正是基于这一要点,每一期的课程 ...

  8. Unity基于响应式编程(Reactive programming)入门

    系列目录 [Unity3D基础]让物体动起来①--基于UGUI的鼠标点击移动 [Unity3D基础]让物体动起来②--UGUI鼠标点击逐帧移动 时光煮雨 Unity3D让物体动起来③—UGUI DoT ...

  9. Unity Tidy Tile Pack #1

    https://www.assetstore.unity3d.com/cn/#!/content/3276 版本: 1.1 下载地址 密码:mt8a

  10. dotnetnuke peek. glance.

    /**** 15:59:39.05 ***/ use dotnetnuke to create websites: 1. install 2. create webpage template 3. c ...