Constantly Refresh the Page
<p>i need create web chat.
So i need constantly refresh page.</p>

<p>I think use this jQuery function:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){   
  var sec = setInterval(function()
        {
        $('#chat').load('chat_r.php?id=' + Math.random());
        }, 1000);
});
&lt;/script&gt;
</code></pre>

<p>But I found out that this function is very slow. </p>

<p>Maybe you know a better option?</p>
