After reading several interesting posts on this site, the auto refresh of a div containing an image, it works correctly.
Why between a refresh and another I get an empty div? (in chrome e IE, for a short moment). In firefox next image is loaded instead of the current without empty div.
The next image is already present in the cache since I do a preloading of the next image Thanks
My code:
<head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script>
<script type="text/javascript">
var
auto_refresh = setInterval( function(){
$
('#refresh').load("refresh.php?rnd="+Math.random()).fadeIn("slow"); },
5000); // refresh every 5000 milliseconds
</script>
</head>
<body>
<div
id="refresh">
</div>
</body>