title: Real-time data on webpage with jQuery
body: <p>I would like a webpage that constantly updates a graph with new data as it arrives. Regularly, all the data you have is passed to the page at the beginning of the request. However, I need the page to be able to update itself with fresh information every few seconds to redraw the graph.</p>
  
  <h3>Background</h3>
  
  <p>The webpage will be similar to this <a href="http://www.panic.com/blog/2010/03/the-panic-status-board/" rel="nofollow noreferrer">http://www.panic.com/blog/2010/03/the-panic-status-board/</a>. The data coming in will temperature values to be graphed measured by an Arduino and saved to the Django database (this part is already complete).</p>
  
  <h2>Update</h2>
  
  <p>It sounds as though the solution is to use the <code>jQuery.ajax()</code> function ( <a href="http://api.jquery.com/jQuery.ajax/" rel="nofollow noreferrer">http://api.jquery.com/jQuery.ajax/</a>) with a function as the <code>.complete</code> callback that will schedule another request several seconds later to a URL that will return the data in JSON format.</p>
  
  <p>How can that method be scheduled? With the <code>.delay()</code> function?</p>