惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - Leon.Zhou

SQLServer 2005 Agent无法启动的问题 TFS(Team Foundation Server)使用经验 VS2005 SP1安装太痛苦了! Team Build 不支持构建WebSite?! ASP.NET 2.0 正式版中无刷新页面的开发 代码覆盖率分析工具--NCover [原创] nunit2report V1.2.2 release 汉化修正版 V1.0 WSS安装时候的一个问题 《OOP实践》的培训文档 发帖庆祝SharePoint团队成立! SPS配置的一个小技巧 【转帖】Gartner公布05年十大业务 称CIO面临3大挑战 再发Wallop和GMail邀请各4个! [公告]郑州(河南地区)的朋友请在这里签名 Wallop和GMail邀请各4个 Eclipse的插件和应用 日程管理功能的网站 Framework设计 查看.Net 源代码的站点 B/S真正的春天似乎要到来了!
Ajax的并发调用
Leon.Zhou · 2007-01-30 · via 博客园 - Leon.Zhou

首先我要先小小的鄙视一下自己。写了这么久js,也做了不少Ajax相关的工作了,今天才知道XmlHttpRequest对象是支持并发的!

这个错误最早是在2003年刚接触XmlHttpRequest时,听一个同事说的,因为那个弟兄是js方面的专家(确实是专家,写过很受欢迎的技术书籍,目前在一个很大的公司做架构师。但人都是有盲点的嘛!),后来我也就没有再想过。唉,今天写看一段程序时突然发现了这个问题。

经过测试,在prototype.js和ASP.NET 2.0 Ajax1.0中默认都是支持的(其他的我没有测试),在ASP.NET 2.0 自带的Callback中也是支持的,但我以前写的一篇文章:ASP.NET 2.0 正式版中无刷新页面的开发中,举的例子是不支持的。把那篇文章中第二步里面提到的:

<%= ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context")%>;

添加一个参数“true”,替换成:

<%= ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context", true)%>;

就可以了。

虽然XmlHttpRequest是支持并发的,但并发的个数却是有限的,超过并发的提交操作会排队等待前面的结束后再提交。因为没有时间测试,具体的个数还不知道,在不同浏览器上的表现也不太清楚,那个弟兄知道了一定要告诉我呀,谢谢!