I want to create a code that will check if there are any new messages about the music and show their number. I know this is simple - just make ajax calls in a function setInterval:
$(document).ready(function () {
setInterval(function () {
}, 30000);
});
but this is not the main thing - I can not find any information about other approaches. Is this the only way to achieve this by installing a function setIntervalto check for updates?
Edit
Ok, I found http://socket.io/ , maybe this is what I'm looking for
source
share