Keep Prototype Search Results Fresh
@prranitarora▲ 9 net votes
If a user changes the search query, clear or label results from the earlier query while the new request runs. This avoids displaying old matches as though they belong to the latest input.
1 COMMENT
Abort the previous request with
AbortControllerwhen the query changes. Otherwise a slow earlier response can overwrite the results for the newer query. Other platform gotchas welcome in the comments.