开发者

Possibilities of COMET over AJAX

开发者 https://www.devze.com 2023-01-28 18:38 出处:网络
I recently came to know about COMET and how it can correspond to the client page without receiving a request from the page itself. But I was wondering what are the possibilities that a开发者_高级运维r

I recently came to know about COMET and how it can correspond to the client page without receiving a request from the page itself. But I was wondering what are the possibilities that a开发者_高级运维rrives with this techniques, which is very efficient and easy in comparison to AJAX.


More and more chat web sites :-)

Now seriously, being part of the HTML5 specification, the WebSocket API allows servers to push data to the client. A big advantage for this is that clients will no longer need to continuously poll the server for updates, when updates are available servers will push data to the client and notify him for those updates, which would preserve bandwidth and allow more efficient applications. Modern browsers already support it. On the other hand an additional server is needed for handling the protocol.


Now its the time of comet.comet is reverse ajax.If you are using ajax in chat applications u need to check everytime for database updations but in the case of comet its all about server side events.We can set the certain events @server side then it will automatically update the webpage when the database is getting updated.that is we dnt need to give requests all the time.So that we can avoid the server headache due to large no.of requests and the application will be very much faster.

This is a live chat example using comet.check it out:www.zeitoun.net/articles/comet_and_php/start

its beyond ajax

0

精彩评论

暂无评论...
验证码 换一张
取 消