How do I properly configure the timeout and queries for automatic search through input?

  • 0
    Tell me, on what principle does autosearch work by entering text into input when it is still being typed, and not by pressing search after typing?

    How to properly configure such an autosearch, otherwise it seems to me stupid to send a request for each change in one letter, especially if someone starts to write a word quickly and get 5-10 identical requests per second, given that the first will be obscene due to the fact that a couple of letters 1-3 will be a lot of places to meet.

    Or is there a good article on this topic?
    JavaScript Anonymous, Aug 15, 2020

  • 1 Answers
  • 0
    Like example . There are a lot of articles. What you are looking for is called debounce . There is also throttle .

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!