I've searched Google a lot. In all the examples having Comet
with PHP
and jQuery
. They are doing:
setTimeout(function(){ check_new_data_function() }, 5000);
function check_new_data_function(){
$.ajax{
blah
}
}
And yes, it's pretty simple to use Comet with checks in every 5 seconds. But this could not be called "COMET" at all, isn't the purpose of Comet to not loop our requests? and instead get the data which is Pushed from server?
See this example.
Or another clip.
They are all having a function which gets the data from another file with $.ajax
requests by looping. But are they really Long Polling/Comet
?
As far as I knew when we didn't want to put the server under many $.ajax
request which are looped, we would use Comet, in Comet the data is gonna Pushed from server to the client browser, was I wrong?
Could someone make this idea clear for me?
Can I Use on Web Sockets - Working Draft:
Partial support refers to the websockets implementation using an older version of the protocol and/or the implementation being disabled by default (due to security issues with the older protocol). Microsoft is currently experimenting with the technology.
https://i.sstatic.net/7nRwm.png
The technology just isn't there yet. Watch this video from SymfonyLive if you want a better grasp on what the specs for HTTP and REST mean. It's interesting, and apparently Twitter goofed.
Also see:
http://en.wikipedia.org/wiki/Comparison_of_WebSocket_implementations