JQuery loadand functions $.ajax()are executed only once. If you are constantly updating, you should use a timer or a loop. Just clear the timer and set a new interval.
var refreshRateMs = 5000;
timerId = setInterval("refreshPage()", refreshRateMs);
function refreshPage() {
$("#somediv").load();
}
clearInterval(timerId)
refreshRateMs += 1000;
timerId = setInterval("refreshPage()", refreshRateMs);
.load(), , .load(). .load() , dom. $.get:
$.get('page_to_load.html', function(data) {
var newContent = $('.result').html(data);
if newContent == $('.oldContent') {
$("#somediv").append(newContent);
}
});