Jquery AJAX Queue bug

Hey Peeps

So, i have a facebook like search, which, on keyup event, sends the query to the backend, and when the request is done, put’s the response in a div.search_results .

Now, when a faster typer, this calls for a alot of requests, which wouldnt be a problem, other than some of the request are slower than others. So if Request 1 is 200ms and request 2 is 10ms, the first results would response from request 2, and after 200ms request 1 will overwrite the reponse from request 2.

This is such a pain. :slight_smile:

Is there a way to fix this? /ignore old requests or something?