简体   繁体   English

Google自定义搜索引擎:“混乱”查询网址

[英]Google Custom Search Engine: “messy” query URL

I'm in the process of adding the Google Custom search engine on my blog, LonePlacebo.com, and noticed that the search query url that shows up looks like a mess like so: 我正在将Google自定义搜索引擎添加到我的博客LonePlacebo.com上的过程中,并且注意到显示的搜索查询网址看起来像是一团糟:

http://loneplacebo.com/search-results/?cx=016164296208729675189%3Aqq4uaxnfgew&cof=FORID%3A11&ie=UTF-8&q=stanford&siteurl=loneplacebo.com%2F http://loneplacebo.com/search-results/?cx=016164296208729675189%3Aqq4uaxnfgew&cof=FORID%3A11&ie=UTF-8&q=stanford&siteurl=loneplacebo.com%2F

But, when I tried the same CSE in CSS-Tricks, the url is much "cleaner" like so: http://css-tricks.com/search-results/?q=css 但是,当我在CSS-Tricks中尝试相同的CSE时,URL像这样更“干净”: http : //css-tricks.com/search-results/? q=css

Any ideas why the discrepancy? 任何想法为什么不一致?

Csstricks is using the custom search element. Csstricks正在使用自定义搜索元素。

You're still using the iframe option, which is no longer supported. 您仍在使用iframe选项,该选项不再受支持。 Not sure how much longer it's going to work. 不知道它将工作多长时间。 iframe deprecated iframe已弃用

Log-in to the Google CSE control panel and choose "results only" layout, this way, you can still use the same search box on your home page. 登录到Google CSE控制面板,然后选择“仅结果”布局,这样,您仍然可以在首页上使用相同的搜索框。

Once you switch, you can remove this: (which makes the "messy" url you speak of) 切换后,您可以删除以下内容:(这使您所说的“凌乱”网址)

<input type="hidden" name="cx" value="016164296208729675189:qq4uaxnfgew"/>
<input type="hidden" name="cof" value="FORID:11"/>
<input type="hidden" name="ie" value="UTF-8"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM