How to check the status each 10 seconds with JavaScript?
<p>I have a server (<em>mysite.com/status</em>), which returns number of active tasks (just a single integer).
How can I check number of active tasks each 10 seconds with JavaScript and show user something like:</p>

<blockquote>
  <p>Number of remaining tasks: XXX</p>
</blockquote>

<p>And, if number of tasks is 0, then I should load another page.</p>
