Skip to content Skip to sidebar Skip to footer

Live Search Optimisation In Javascript

I have some code in Javascript (not jQuery, unfortunately) at the moment that performs a live search on a database, depending on what the user enters. The problem is, if you type

Solution 1:

Make the ajax call trigger 1 or 2 seconds after the user stopped typing.

If you need code for this let me know in the comments.

Solution 2:

You can check if there's already a request running. If so, abort it. (currentRequest.abort())

Post a Comment for "Live Search Optimisation In Javascript"