This post originated from an RSS feed registered with .NET Buzz
by Sudhakar Sadasivuni.
Original Post: How "Google Suggests" works ?
Feed Title: {Sudhakar's .NET Dump Yard;}
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/ssadasivuni/rss.aspx
Feed Description: using Sudhakar.Dotnet.Blog.Main;
Just to dig through this, I had set up a side bar of Live HTTP Headers for FireFox and observed a very very simple communication between browser and Google.
When I tried my name "Sudhakar Sadasivuni"
From Browser to Google GET /complete/search?hl=en&js=true&qu=sudhakar%20sadasivuni HTTP/1.1 Host: www.google.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: PREF=ID=153437983ed96ad9:CR=1:TM=1101787951:LM=1102999867:GM=1:S=OoygLXkhpj3r2pL8 Pragma: no-cache Cache-Control: no-cache
From Google to Browser HTTP/1.x 200 OK Via: 1.0 MSWIPGATE Content-Length: 105 Date: Tue, 14 Dec 2004 10:13:30 GMT Content-Type: text/html; charset=utf-8 Content-Encoding: gzip Server: Auto-Completion Server Cache-Control: private, x-gzip-ok=""
The first GET delivers the following RPC command back to browser, which creates a DIV based on the parameters sent in sendRPCDone method.
sendRPCDone(frameElement, "sudhakar sadasivuni", new Array("sudhakar sadasivuni"), new Array("1,480 results"), new Array(""));
The red marked things are the key players in the "fast" factor of this functionality. Google is using HTTP Compression. It is encoding the content by Gzip algorithm and sending a super compressed packet of Suggestions in the form of a dynamic creation of DIVs on the box.
Just now got more on this via Srinivas...Interesting ..Is'nt it ?