i would like to know what its a good way of auto load new content without page refresh. for example, previously in twitter trending, when someone posted related trending contents, it will auto load the newly submitted content without page load.
i tried a few methods, for example (pull methods), in my javascript i would set intervals to load frm sql query:
var auto_refresh = setInterval(function () {
$('#myLinks').load('http://domain.com/link/loadlatestnews').fadeIn(2000);
}, 400); // refresh every 400 milliseconds
but is this a good idea because it requires the client to constantly trying to load from sql every 400 milliseconds.
is it possible to have push methods whereby if there's a new content in mysql, set a event callback??