So I was debugging the google search using chrome dev tools and I found out that each time I modify the contents of the search bar, it makes a network call. That itself was baffling for me because this means each search generates around 10 or more server calls for google! Even more surprising is the fact that even then google manages to return suggestions so fast. How do they do it?
One more doubt would be how they handle concurrent ajax calls? (assuming they are ajax calls ofcourse). Like if my search does 10 ajax calls to the server and the latest ajax call returns results faster than the second last ajax call then in that case the response from the second last ajax call would be shown on the UI instead of the latest call right?