ajax comet
There are a number of ways to implement Ajax and Comet, and these underlying implementations
are sometimes known as transports.
有很多方法可以实现ajax和comet,这些底层实现有时叫做transports.
The <img> element, for example,
has a src property. When a script sets this property to a URL, an HTTP GET request
is initiated to download an image from that URL.
例如,<img>元素有一个src属性。当脚本设置它的属性为一个URL时,一个HTTP GET请求被创建,来从这个URL上下载图像。
A script can therefore pass information
to a web server by encoding that information into the query-string portion of the
URL of an image and setting the src property of an <img> element.
脚本可以向服务器传送信息,通过把那些信息编码成图像URL的查询字符串的一部分,和设置<img>元素的src属性。
The web server must
actually return some image as the result of this request, but it can be invisible: a transparent
1-pixel-by-1-pixel image, for instance.
服务器必须返回一些图像,作为这个请求的结果,但是它可以不可见:例如一张透明图片。
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。