I have a webpage where a certain div needs to be updated every 3 seconds. This div contains variables that rely on the rest of the contents of this page (for example, if you are registered on a website, what username, etc.)
I achieved this refreshing effect with jQuery
setInterval(function()
{
$('#div').load('page.php #div');
}, 3000);
;
I have a question: ajax loads the whole page before inserting the desired div block into place. About 15 requests are presented on the whole page (maybe a little more). These queries are pretty simple, just looking at a row or field (SELECT).
With the above script, these 15+ requests will be executed every 3 seconds, i.e. 5 requests per second. If I have 100 visitors, then this is 500 requests per second. Before I go any further I need to know is this too much?
Deanr source
share