【问题标题】:Google Custom Search Engine taking a long time to load on webpage?谷歌自定义搜索引擎需要很长时间才能加载到网页上?
【发布时间】:2012-04-25 22:50:53
【问题描述】:

我通过 www.google.com/cse/ 与 google 建立了一个自定义搜索引擎

我正在我的 Chrome 网站上的机器上对其进行测试,网页加载正常,但 CSE 需要 45 秒以上的时间才能加载。当它加载时,它工作得很好。

有人遇到过这个问题吗?

我在 Firefox 中尝试,它会立即加载,没有问题。在 IE9 中,它有:

Internet Explorer 已限制此网页运行脚本或 ActiveX 控件。

有一个可用的启用选项。

这可能是 Chrome 的 ActiveX 问题吗?

【问题讨论】:

  • 我可以在 Chrome 中重现这个。很奇怪 - 我会调查的。

标签: html search-engine google-custom-search


【解决方案1】:

据我所知,这似乎是 Google AJAX APIs(或 CSE 生成器)的错误。我找到了一种解决方法,可以让自定义搜索在 Chrome 中快速加载:

假设您没有修改从www.google.com/cse/ 收到的代码,请更改:

google.load('search', '1', {language : 'en', style : google.loader.themes.V2_DEFAULT});

到:

google.load('search', '1', {language : 'en'});

由于某种奇怪的原因,style 设置会导致 Chrome 中的加载时间过长/无限。

【讨论】:

  • 成功了!谢谢!永远不会猜到是这种风格扼杀了它。
  • 这个漏洞在 2015 年仍然存在,看来 google 根本没有修复它。
  • 似乎我们不再可以选择跳过 2017 年提供的代码之后的样式
猜你喜欢
  • 1970-01-01
  • 2017-03-23
  • 1970-01-01
  • 1970-01-01
  • 2014-08-15
  • 1970-01-01
  • 1970-01-01
  • 2012-06-24
  • 1970-01-01
相关资源
最近更新 更多