Refresh list (getJSON and setTimeout) without intermittent effect

Refresh list (getJSON and setTimeout) without intermittent effect

hi,
I'm creating a list of online users.
the problem is that when I refresh the list with setTimeout, the list of users disappears for less then a second and then reappear.
I this because this is the time to get data from the server
this is my code:
  1. function getUOL() {
  2.     $("#online_box ul").empty();
  3.     $.getJSON("/uol.php?action=getUOL&tipo=1", function(data) {
  4.         $.each(data, function(i, utente) {
  5.             $("#online_box ul").append('<li><a href="/community/profilo.php?ID='+utente.IDUtente+'">'+utente.user+'</a></li>');
  6.         });
  7.         setTimeout('getUOL()', 5000);
  8.     });
  9. }
there is a way to refresh list without have this "Intermittent effect"?
perhaps the problem is the line $("#online_box ul").empty(), but how can I update all list without clear all?
Thank you.