Javascript& SEO [英] Javascript & SEO

查看:107
本文介绍了Javascript& SEO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何判断谷歌机器人是否正在阅读我生成的javascript内容?

How can I tell if a google bot is reading my javascript generated content?

我有一个AJAX脚本,可以在页面上动态生成一些文本...内容不会因用户而改变,只会按日期/时间更改。

I have an AJAX script that generates some text dynamically on a page... this content does not change by user, but simply by date/time.

我不知道如何让谷歌看到它。

I am not sure how I can tell if google sees it.

推荐答案

搜索引擎机器人没有javascript,因此他们不会看到通过AJAX等动态添加到您页面的任何内容。在您的浏览器选项中,关闭Javascript并重新加载您的网站。他们将看到的只是内容和链接。

Search engine bots don't have javascript, so they won't see any content that was dynamically added to your page via AJAX, etc. In your browser options, turn off Javascript and reload your website. All that they'll see is the content and the links there.

解决方案:在您的页面上,在纯HTML中放置一个指向页面的链接,其中显示其余部分你的内容(你将通过AJAX加载的东西),然后让Javascript替换与内容的链接。搜索引擎机器人将看到链接并关注它,索引您的所有内容。只需确保在这些低保真页面上,您提供返回常规页面的链接,因为这将是Google将链接到的页面。

The solution: on your page, in the plain HTML place a link to a page which shows the rest of your content (the stuff that you would load via AJAX), then have Javascript replace that link with the content. The search engine bots will see the link and follow it, indexing all your content. Just make sure that on these lo-fi pages, you provide links back to the regular page, since that's what Google will link to.

这篇关于Javascript& SEO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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