如何使我的网页在Google即时预览中显示良好? [英] How do I make my page look good in Google Instant Previews?

查看:115
本文介绍了如何使我的网页在Google即时预览中显示良好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在 Google即时预览中查看来自我的网站的网页时,您会看到AJAX错误消息(由文档准备就绪时触发的某些AJAX引起):

When you view a page from my site in Google Instant Previews, you see an AJAX error message (caused by some AJAX that fires on document ready):

我假设解决方法是使我的javascript与任何JavaScript引擎Google的浏览器使用

I assume the way to fix this is to make my javascript compatible with whatever javascript engine Google's "browser" uses (like one might design for IE6).

推荐答案

预览是以两种方式之一生成的:

Previews are generated in one of two ways:


  • 通过正常的Googlebot抓取

  • 动态使用用户代理 Mozilla / 5.0(en-us)AppleWebKit / 525.13(KHTML,如Gecko; Google Web Preview)版本/ 3.1 Safari / 525.13 li>
  • Via normal Googlebot crawls
  • On the fly using the user-agent Mozilla/5.0 (en-us) AppleWebKit/525.13 (KHTML, like Gecko; Google Web Preview) Version/3.1 Safari/525.13

如果内容最近已被抓取,则很可能会重复使用正常抓取的内容。如果没有,那么它会尝试在飞行中生成它。在内部,它使用类似的基于Safari / Webkit的浏览器,这是你可能想用来检查你的网页。我相信有一种方法来修改Safari使用的用户代理,这将是一种更具体的检查方法。

If the content has been crawled recently, it's likely to reuse the normal crawled content. If not, then it'll try to generate it on the fly. Internally, it uses a similar Safari/Webkit-based browser, so that's what you'd probably want to use to check your pages. I believe there's a way to modify the user-agent that Safari uses, which would be one way to do a more specific check.

如果由于某种原因,无法抓取AJAX内容(比如robots.txt不允许抓取,或者服务器主动阻止Googlebot访问它)失败优雅(因为它应该时,用户遇到相同的问题)。不显示错误弹出式窗口 - 只是在内部记录,并回退到某些默认内容。

If for some reason the AJAX content can't be fetched (say it's disallowed by robots.txt or the server actively blocks Googlebot from accessing it), then the site should fail gracefully (as it should when users run into the same problem). Don't show an error popup -- just log it internally and fall back to some default content.

在进行更改后,仔细检查是否可以正常工作到您网站的模板是做一个网站:-query来找到类似,模糊的网页,并检查他们的预览图像;如果没有其他人检查预览图像,它将被即时渲染,所以你会立即看到结果。一旦你对它的呈现感到满意,它需要一些时间来赶上和重新渲染现有的页面;它不会以与缓存页面或正常片段相同的频率更新。

One way to double-check if it works after you have made changes to your site's template is to do a site:-query to find similar, obscure pages, and to check their preview images; if nobody else has checked the preview images, it will be rendered on the fly so you will see the results right away. Once you're happy with how it renders, it will take a bit of time to catch up and re-render the existing pages; it doesn't update with the same frequency as cached pages or normal snippets do.

这篇关于如何使我的网页在Google即时预览中显示良好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆