title: How to avoid overhead of continuous ajax request on keyup event?
body: <p>e.g. In a search form when user enter some text, at that time, AJAX request should send on each keyup event, with search key as query string. Search key will be value from input box. </p>
  
  <p>If user enters "ABCD", in this case first 3 AJAX request should get kill/cancel, because in 4th AJAX request searchkey will be "ABCD"</p>
  
  <pre><code>$(document).ready(function(){
      $("#searchInput").keyup(function(){
          ajaxSearch( $("#searchInput").val() );
      });
  });
  </code></pre>
  
  <p>On keyup event I am calling following "ajaxSearch()" function.</p>
  
  <pre><code>function ajaxSearch(searchKey) {
      $.ajax({
          type: "get",
          url: "http://example.com/ajaxRequestHandler/",
          data: "action=search&amp;searchkey=" + searchKey
      }).done(function() {
          /* process response */
      });
  }
  </code></pre>