I'm using javascript to update a div
every 5 seconds, and every 5 seconds the div
updates, but is creating several div
equal.
I have the following code:
session_start();
$url ="http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$_SESSION['URL'] = $url;
echo(" <script>
$(document).ready(function(){
$('#chatDiv').load('$url');
var refreshId = setInterval(function(){
$('#chatDiv').load('$url');}, 5000);
$.ajaxSetup({ cache: false});
});
</script>");