title: Polling Vs AsyncCallback callbacks - best approach for a slow web service?
body: <p>I have a webpage that uses AJAX to get search results for a page. On the server side I am querying a web service that is very slow - 20 seconds to 2 minutes.</p>
  
  <p>As I understand it, my options are either polling or having a long running request.</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/system.asynccallback.aspx" rel="nofollow noreferrer">AsyncCallback</a> seems to be ideal since the result would be returned as soon as the web service responds and the thread won't be blocked on the server-side.</p>
  
  <p>Is there a better approach to doing this? Do you know of any issues with long running HTTP requests in jQuery?</p>
  
  <p>Update: Yes, I will be caching the response from the web service when possible. I don't have any control over the external web service that I am querying.</p>