【问题标题】:Google Custom Search Engine: "messy" query URL谷歌自定义搜索引擎:“混乱”的查询网址
【发布时间】:2011-11-05 06:56:38
【问题描述】:

我正在我的博客 LonePlacebo.com 上添加 Google 自定义搜索引擎,并注意到显示的搜索查询 url 看起来像这样一团糟:

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

但是,当我在 CSS-Tricks 中尝试相同的 CSE 时,URL 会更加“干净”,如下所示: http://css-tricks.com/search-results/?q=css

知道为什么会出现这种差异吗?

【问题讨论】:

    标签: google-search


    【解决方案1】:

    Csstricks 正在使用自定义搜索元素。

    您仍在使用 iframe 选项,该选项已不再受支持。不知道它还能工作多久。 iframe deprecated

    登录 Google CSE 控制面板并选择“results only”布局,这样您仍然可以在主页上使用相同的搜索框。

    切换后,您可以将其删除:(这会使您所说的“混乱”网址)

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多