Google Chrome 如何建议网址补全?

发布于 2024-07-17 04:53:48 字数 221 浏览 26 评论 0原文

我了解了 Google 的(非官方)建议 API 和他们的搜索 API,它们看起来都很棒,但建议 API 实际上并不建议导航完成。 另一方面,在 Google Chrome 中,如果您开始输入“apple”,它会建议“www.apple.com/trailers”。

我知道它会搜索您的浏览历史记录,但我从未访问过该页面,因此它无法在本地获取它。

这是另一个非官方的秘密 API 吗?

I've learned about Google's (unofficial) suggest API and their search API, which both look really great, but the suggest API doesn't actually suggest navigational completions. On the other hand, in Google Chrome if you start to type for example "apple", it will suggest "www.apple.com/trailers".

I know it searches your browsing history, but I've never been to that page so it's not getting it locally.

Is this another unofficial secret API?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撑一把青伞 2024-07-24 04:53:48

如果您使用透明回显代理,这可以显示所有 http 流量 Charlesfiddler 是两个很好的例子,我推荐 Charles。

当我在 chrome 中输入“app”时,查看新的工作流量,我看到以下请求

http://clients1.google.co.uk/complete/search?client=chrome&output=chrome&hl=en-US&q=app
GET /complete/search?client=chrome&output=chrome&hl=en-US&q=app HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19
Accept-Encoding: gzip,deflate,bzip2,sdch
Cookie: SID=DQAAAIYAAAATI2S8dKFp5KGjAbyGxNaA4R4qbW24KzjW3jHTJOqIewCl64OqpBjnj7ReJ1aoFBA_rJ5h32jTrwD_xFTEgVfSqqXMfh_1e8bIcvLgz8qSRnXxWNUepTD90fXeHh0KfKtI9EkdkjgOPT2a9_1DJBlyzpOItI7o-fD5zQ6fjA9YdlC4TeCZqlsjbD6O8nXR5mg; PREF=ID=427f2a6420c4c235:U=19879741710226bb:TM=1224000168:LM=1240414461:S=kGvdcM6wirgoK_L7; NID=21=QOXGkbW3w-orrYC5IFOpPW9jEwdTz4oNJ6Pem0lcyFlvzxZHQgyYsf63kR2g4Pq62H0xWR8l7mF03GLgIJoPAZPIlMFG-ghig5ManOtWA7f3bqqq1eNtWSYyZYo4Ja5z
Accept-Language: en-US,en
Accept-Charset: ISO-8859-1,*,utf-8
Host: clients1.google.co.uk

随着响应

HTTP/1.1 200 OK
Content-Type: text/javascript; charset=utf-8
Date: Fri, 24 Apr 2009 08:06:54 GMT
Expires: Fri, 24 Apr 2009 09:06:54 GMT
Cache-Control: public, max-age=3600
Content-Encoding: gzip
Server: Auto-Completion Server
Content-Length: 175

["app",["http://www.apple.com/uk/","apple","apple store","apple trailers"],["Apple (United Kingdom)","437,000,000 results","37,700,000 results","995,000 results"],[],{"google:suggesttype":["NAVIGATION","QUERY","QUERY","QUERY"]}]

Charles 了解 JSON,因此将其转换为漂亮的格式
Charles 的屏幕截图 http://img2.imageshack.us/img2/2926/suggestionsforapp.png

查看完整尺寸

如您所见(最简单的完整尺寸图像)此 Google 服务返回 4 个结果,其中之一为 NAVIGATION(http://www.apple.com/uk/< /a>) 和 3 个 QUERY 类型(苹果、苹果商店、苹果预告片)。 它还包含导航结果(Apple(英国))的每个描述以及每个查询建议的结果数量(437,000,000 37,700,00 995,000)的更多信息。

If you use a transparent echoing proxy this can show you all http traffic Charles and fiddler are two good example, I recommend Charles.

Looking at new work traffic when I type "app" into chrome I see the following request

http://clients1.google.co.uk/complete/search?client=chrome&output=chrome&hl=en-US&q=app
GET /complete/search?client=chrome&output=chrome&hl=en-US&q=app HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19
Accept-Encoding: gzip,deflate,bzip2,sdch
Cookie: SID=DQAAAIYAAAATI2S8dKFp5KGjAbyGxNaA4R4qbW24KzjW3jHTJOqIewCl64OqpBjnj7ReJ1aoFBA_rJ5h32jTrwD_xFTEgVfSqqXMfh_1e8bIcvLgz8qSRnXxWNUepTD90fXeHh0KfKtI9EkdkjgOPT2a9_1DJBlyzpOItI7o-fD5zQ6fjA9YdlC4TeCZqlsjbD6O8nXR5mg; PREF=ID=427f2a6420c4c235:U=19879741710226bb:TM=1224000168:LM=1240414461:S=kGvdcM6wirgoK_L7; NID=21=QOXGkbW3w-orrYC5IFOpPW9jEwdTz4oNJ6Pem0lcyFlvzxZHQgyYsf63kR2g4Pq62H0xWR8l7mF03GLgIJoPAZPIlMFG-ghig5ManOtWA7f3bqqq1eNtWSYyZYo4Ja5z
Accept-Language: en-US,en
Accept-Charset: ISO-8859-1,*,utf-8
Host: clients1.google.co.uk

With the response

HTTP/1.1 200 OK
Content-Type: text/javascript; charset=utf-8
Date: Fri, 24 Apr 2009 08:06:54 GMT
Expires: Fri, 24 Apr 2009 09:06:54 GMT
Cache-Control: public, max-age=3600
Content-Encoding: gzip
Server: Auto-Completion Server
Content-Length: 175

["app",["http://www.apple.com/uk/","apple","apple store","apple trailers"],["Apple (United Kingdom)","437,000,000 results","37,700,000 results","995,000 results"],[],{"google:suggesttype":["NAVIGATION","QUERY","QUERY","QUERY"]}]

Charles knows about JSON so translates this into a pretty format
Screen Shot Of Charles http://img2.imageshack.us/img2/2926/suggestionsforapp.png

See full size

As you can see (easiest the full size image) this google service returned 4 results, one of type NAVIGATION(http://www.apple.com/uk/) and 3 of type QUERY(apple, apple store, apple trailers). It also contains more information for each a description for the NAVIGATION result(Apple(United Kingdom)) and the number of results for each of the QUERY suggestions(437,000,000 37,700,00 995,000).

好久不见√ 2024-07-24 04:53:48

单击选项底层,您可以看到它在哪些服务中搜索其导航选择。 听起来它正在为您结合历史记录和搜索建议。

Click Options, Under the Hood and you can see which services it searches for it's navigational selections. It sounds like it's combining history and search suggestions for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文