php jquery auto load content
<p>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.</p>

<p>i tried a few methods, for example (pull methods), in my javascript i would set intervals to load frm sql query:</p>

<pre><code>var auto_refresh = setInterval(function () {
        $('#myLinks').load('http://domain.com/link/loadlatestnews').fadeIn(2000);
    }, 400); // refresh every 400 milliseconds
</code></pre>

<p>but is this a good idea because it requires the client to constantly trying to load from sql every 400 milliseconds.</p>

<p>is it possible to have push methods whereby if there's a new content in mysql, set a event callback??</p>
