微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ajax – Google使用#而不是搜索?在URL中为什么?

我不知道他们已经做了多长时间了,但我只是注意到google在搜索网址中使用#而不是搜索

方法
http://www.google.com/#q=stackoverflow
老方式
http://www.google.com/search?q=stackoverflow

磅/哈希符号通常用作页面的一部分的锚点。
除了更短的网址,Google可以获得什么好处?似乎反对搜索引擎惯例,但是再次Google设置约定。有什么问题可以看到这种方法吗?

UPDATE
要测试自己使用www.google.com的一般搜索框。你会得到一些其他的垃圾在url,但q =之前的部分是我提到的这个问题。

更新2
看起来这可能是一个实验性的功能,他们正在随机使用者进行测试,因为有些人被重新路由到搜索中?结果当试图去#结果。

更新3
从对话here看来,这已经推出给所有的Firefox用户使用主要的google.com网站进行搜索

摘录

4/27/09
The # in query parameters is a
separate experiment that the search
team was doing (AJAX based search
results pages) that started some time
back. It was discussed quite fervently
in the Yahoo Web Analytics discussion
group a few months ago. Random groups
of people were/are assigned to be a
part of the experiment,and that
caused all the keyword data for that
user to dissapear from every Analytics
tool. It looks like the experiment is
still going on.

4/28/09 The # in query parameters
appears to have been rolled out to all
Firefox users on www.google.com
SERP`s,so this must have passed the
testing stage. I am speculating that
FireFox is able to handle AJAX better
that IE,thus it has not been rolled
out to IE users.

5/1/09 When I dug into the SERP’s
pages it looks like Google initially
puts the websites “true” URL in the
link,but once the link is clicked the
URL is replaced with a Google redirect
URL of the form
www.google.com/url?q=flowers&blahblahblah.
That redirect URL is what shows up in
the HTTP referrer field and what gets
reported by the web browser (and
therefore the Analytics tools).

我的谷歌仍然使用搜索?前缀,但是使用哈希(#)的好处是它不需要重新加载页面添加查询字符串(?)会强制页面在所有浏览器中重新加载。

通过使用哈希,它们可以通过允许它在浏览器元素中保留一个项目来保存在“内存”中。添加哈希还会为页面创建一个历史记录对象。这可以保持前进和后退功能,同时允许他们使用AJAX处理您的搜索。基本上这意味着他们只需要获取加载整个页面所需的HTTP标头的一部分,而不会丢失满载的功能,可以更快地处理您的搜索

原文地址:https://www.jb51.cc/ajax/160315.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐