Ajax "real-time" secret

2009-03-27  来源:本站原创  分类:AJAX  人气:1942 

If New to Ajax or only know the field , "polling" concept may allow you to feel scared. Unfortunately, polling is the only solution. To client and server set up a row between the pipes, at the same time at the two ends do not need to install specific software, implementation does not yet exist for this purpose can be cross-platform, cross-browser method. Even so, may also be necessary to carry out specialized configuration of the firewall before it can work. Therefore, if everyone is required can be a simple approach, Ajax and the poll is the only possibility.

But continued to publicize and advocate the "real-time" Where is it? Polling can not be real-time. This really true? I think it depends on your definition of real-time. I have prepared electrophysiology data retrieval code, real-time means that the ms. I believe, in some cases, geologists put hours, days or even years as a real-time.

If access to Wikipedia, that is, will find that the average human reaction time at around 200-270 milliseconds. That is, hit the first ball of time. Read a message and the response time to form much longer, even if you are into. Therefore, waiting for a chat message, about 200 milliseconds (which may be a little longer) time should be sufficient. I set to one second, but did not feel uncomfortable.

From http://www.ibm.com/developerworks/cn/xml/x-ajaxxml8/

相关文章
  • Ajax "real-time" secret 2009-03-27

    If New to Ajax or only know the field , "polling" concept may allow you to feel scared. Unfortunately, polling is the only solution. To client and server set up a row between the pipes, at the same time at the two ends do not need to install spe

  • ajax entry Xiang Jie (2) 2010-04-03

    Open Request With the URL to connect to can be configured after the request. XMLHttpRequest object can be open () method to complete. The method has five parameters: · Request-type: the type of send request. Typical values are GET or POST, but can al

  • jQuery Form Plugin: AJAX submission form complete programs 2011-01-08

    Translated: http://www.malsup.com/jquery/form/ Introduction jQuery Form Plugin can be easily and implicitly to improve the HTML form using AJAX (Form). The main function ajaxForm and ajaxSubmit collect information from the form element and then decid

  • JS and Ajax using an asynchronous request 2011-05-25

    This article describes how to create XMLHttpRequest to adapt to different instances of the browser, create and send requests, and respond to the server. You will begin to touch on the most basic and fundamental nature of all objects and Ajax programm

  • High viscosity secret society of station design points - Bookmark 2011-02-09

    Reference Note: the original from the book "Zhuchaoyinfeng - website design high viscosity social secret", this is only a summary of some of the ideas, but enough to form a rough understanding that if they do not understand that point of view ve

  • jquery.form.js官方插件介绍Form插件,支持Ajax,支持Ajax文件上传 2011-12-14

    [JQuery框架应用]:form.js官方插件介绍 Form插件,支持Ajax,支持Ajax文件上传,功能强大,基本满足日常应用. 1.JQuery框架软件包下载 文件: jquery.rar 大小: 29KB 下载: 下载 2.Form插件下载 文件: jquery.form.rar 大小: 7KB 下载: 下载 3.Form插件的简单入门 第一步:先增加一个表单 <form id="myForm" action="comment.php" method=

  • jQuery Form Plugin:AJAX方式提交表单的完全方案 2013-08-21

    译自:http://www.malsup.com/jquery/form/ 简介 jQuery Form Plugin可以简便且隐式地使用AJAX改善HTML表单(Form).主要的函数ajaxForm和ajaxSubmit从表单元素中收集信息然后决定如何管理提交过程.这两个函数都支持很多的选项,它们可以使你完全控制数据的提交方式.用AJAX提交表单再没有jQuery Form Plugin更方便的了. 开发这个插件经过了一个团队的努力,许多人为它贡献各种点子和代码: John Resig.Mi

  • JS after ajax request return of the problem can not be implemented 2009-03-01

    1: Send ajax request, in the onComplete, if back when the html contains a javascript, then these javascrip and will not be realized, it does not mean not to implement. This problem has troubled me for a long time, behind the hair and then put this kn

  • jquery ajax example 2009-03-01

    1. Check js file $. ajax (( type: "GET", url: "test.js", dataType: "script" )) 2.post data $. ajax (( type: "POST", url: "xxxx", data: "name = zhaoaiqing & age = 25", success: function (msg)

  • IBM Ajax Tutorial Series 2009-03-01

    Links: http://ibm.csdn.net/ISN_J.aspx?action=JMP&pointid=1550 Part 10: Using JSON for data transmission In the asynchronous application to send and receive information, you can choose to plain text and XML as data format. Ajax grasp of this issue to

  • ajax overtime 2009-03-02

    var havereturn=false; function ontimeout(){ if(!havereturn){ //Haven't returned, alert("Connection timeout "); havereturn=true; //Perhaps is there any way to make xmlhttp stopped, you can write in this, it's still okay. //window.clearTimeout();

  • Ajax Portal 2009-03-03

    The first test procedure: <html> <title>Full use XMLHttpRequest to load the document example </title> <head> <script type='text/javascript'> var req=null; var console=null; var READY_STATE_UNINITIALIZED=0; var READY_STATE_LOA

  • AJAX Packaging Tools 2009-03-05

    Writing a javascript procedure ajax package put in a js file for your reference, please exhibitions. First statement of a few variables: var AJAXUtil = new Object();//Tool object var xmlHttpRequest;//XMLHttpRequestObject var sateChangeMethod; //The m

  • prototype of Ajax.updater () method 2009-03-06

    bring their own rails in prototype.js <a href="javascript:void addlist('cunzhuang',cunzhuangs,zoomlarger)"> village </ a> | Cunzhuang''in rthml is another page in ror should not increase in rhtml suffix html or. To access the page th

  • Practical struts with ajax when the parameters of the solution to Chinese 2009-03-06

    Problems encountered today, a look at the Internet search and found this solution, recorded to prevent the next find. Should not find the bar, I have to remember this has been, huh, huh. . . . At ajax with struts used, the parameters with the Chinese

  • ajax chat 2009-03-07

    Some pretty good chat php open source AJAX tools, detailed http://roshanbh.com.np/2008/09/free-ajax-chat-applications-php.html can see

  • jQuery / Ajax / PHP / Json example of an integrated collection 2009-03-07

    jQuery excellent Javascript is a framework for a good js packaging, provides a lot of convenient features. jQuery for ajax packaging can be called outstanding. jQuery can json file transfer protocol to transmit data (similar to xml, but also signific

  • struts2 ajax verify the existence of input values 2009-03-07

    struts2 ajax verify the existence of input values Today to do the struts2 ajax validate input regarding the existence of the function, and now share with everyone, I hope everyone many opinions!!! input.jsp page code: <html> <body> <s:form

  • ajax input prompt implementation 2009-03-07

    Projects have used at the time entered by the user to give some tips, suggesting that the contents are extracted from the database (in Chinese). So a google search under the amended part of their code to share with you. Attachment is available at the

  • AJAX response to the basic implementation of a simple example 2009-03-08

    Send requests for the page code <html> <head> <title>ajax</title> <script language="javascript"> /* Create a new XMLHttpRequest object to talk to the Web server */ var xmlHttp = false; try { xmlHttp = new ActiveXObj