I want to create the code which will check if e.g some new muser messages appeared and show its count. I know it's simple - just make an ajax calls in the setInterval function:
$(document).ready(function () {
setInterval(function () {
//create an ajax call
}, 30000);
});
but it's not the point - I can't find any information of the other approaches. Is it the only way to achieve this by set the setInterval function to check the updates ?
Edit
Ok, I've found http://socket.io/ maybe it's what I'm looking for