Easy comet with jquery
Install
bower install arodu-jquery-comet
Connection
var comet = $.comet({
url: 'comet.php',
onMessage: function(m){
// Actions
}
});
start
comet.start();
stop
comet.stop();
options
$.comet({
url: 'comet.php',
timeout: 60000,
type: 'GET',
dataType: 'json',
autoStart: true,
url: null, // String
onMessage: function(){},
onError: function(){},
});