Joel: “It’s one of the first prominent uses I’ve seen of the XmlHttpRequest technique of going back to the web server for more data while the user interacts with a page.”
It disables your browser’s autocomplete on that textfield (for obvious reasons). Then it basically just defines a hidden div for that auto-complete dropdown (variations on this depending on browser… frickin’ incompatibilities).
Each time you type a character, it populates that div body with the results of a quick, tiny query back to Google. It’s NOT running the search for you; it’s hitting (I assume) a simple, probably totally in-memory list of the most popular searches and number of results. That’s how it can be so quick a response — the lookup on their end is super-minimal, and the data to be transferred is probably less than 1k each time.
Cool. Nice concept, nice execution. And one of those nice “only obvious in hindsight” additions.