 <p>With Jquery</p> <pre> $(document).ready(function () { $("#live").load("ajax.php"); var refreshId = setInterval(function () { $("#live").load('ajax.php?randval=' + Math.random()); }, 3000); }); </pre> <p>it calls ajax.php in first load and every 3 seconds to #live div.</p>