title: AJAX: how to get progress feedback in web apps, and to avoid timeouts on long requests?
body: <p>This is a general design question about how to make a web application that will receive a large amount of uploaded data, process it, and return a result, all without the dreaded spinning beach-ball for 5 minutes or a possible HTTP timeout.</p>
  
  <p>Here's the requirements:</p>
  
  <ul>
  <li>make a web form where you can upload a CSV file containing a list of URLs</li>
  <li>when the user clicks "submit", the server fetches the file, and checks each URL to see if its alive, and what the title tag of the page is.</li>
  <li>the result is a downloadable CSV file containing the URL, and the result HTTP code</li>
  <li>the input CSV can be very large ( > 100000 rows), so the fetch process might take 5-30 minutes.</li>
  </ul>
  
  <p>My solution so far is to have a spinning javascript loop on the client site, which queries the server every second to determine the overall progress of the job.  This seems kludgy to me, and I'm hesitant to accept this as the best solution.</p>
  
  <p>I'm using perl, template toolkit, and jquery, but any solution using any web technology would be acceptable.</p>
  
  <p><b>edit:</b>
  An example of a possible solution is in this question: <a href="https://stackoverflow.com/questions/333664/simple-long-polling-example-code">How do I implement basic &quot;Long Polling&quot;?</a></p>