Friday, December 10, 2004

Google Suggest beta

Ok, I've just changed my homepage to this. Google Suggest guesses what you are typing and offers suggestions in real time. Its like instant access to any piece of human knowledge; it now can guess what you are looking for as you type.

Most of the work happens in a condensed Javascript library (not easy reading though). It disables the autocomplete feature on the textfield and defines a hidden div for the auto-complete dropdown (variations of this for different browsers). 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.

Neat concept.

0 Comments:

Post a Comment

<< Home