Javascript & SEO

2019-01-25 14:41发布

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

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.

10条回答
女痞
2楼-- · 2019-01-25 15:11

It doesn't. As far as I know, Google does not yet support JavaScript (or, in fact, any form of dynamic content).

查看更多
Juvenile、少年°
3楼-- · 2019-01-25 15:14

Perform a fetch and render within Google's Webmaster tools. Google will tell you in there. Alternatively, use their page speed test tool. Again, it will tell you if your JS is accessible or not.

The easiest way to know, is to simply copy a chunk of text output within the JS within the browser and perform a search in Google.

查看更多
爷的心禁止访问
4楼-- · 2019-01-25 15:19

I would run it through Google's Webmaster tools site, which has a function to view your page as Googlebot. You may be able to determine it's visibility through there.

https://www.google.com/webmasters/tools/home?hl=en

查看更多
乱世女痞
5楼-- · 2019-01-25 15:21

If you're considering developing a full-blown AJAX website, Google says there's a way of making AJAX applications crawlable.

Short answer: there's an agreement between crawler and server on URIs.

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2019-01-25 15:23

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.

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.

查看更多
我命由我不由天
7楼-- · 2019-01-25 15:23

JavaScript generated content is not indexed by search engines. See this question for more info.

查看更多
登录 后发表回答