title: implementing long running background tasks in phonegap
body: <p>I am trying to run a snippet of javascript which keeps polling the server for updates. what is the best way to get this working with minimal impact on application performance from the end user perspective. </p>
  
  <p>I tried spawning it off in a separate iframe but the resultant performance was pretty bad.</p>
  
  <p><strong>I am currently working on android so if the solution involves writing a phonegap plugin to poll the server instead of javascript that should be fine for now. I need to update data in local storage after polling the server.</strong></p>