可以google抓取javascript生成的链接? [英] can google crawl javascript generated links?

查看:124
本文介绍了可以google抓取javascript生成的链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已被多次询问(但是在不同的变化中),但我完全糊涂了......

I know that this question has been asked many times ( but in different varuations), but I got totally confused...

我有一个有权利的网站显示一些内容的面板 - 一组指向新闻/内部文章的链接。
这是所有网站页面的相同列表。
因此,每当新闻栏目中有新的链接/行时,我必须手动遍历所有站点的页面并更新它们。这真非常烦人且费时。

I have a website with a right panel displaying some content - a set of links to news/inner articles. This is the same list for all site's pages. Thus, every time there is a new link/line in th news section, I have to go manually over all site's pages and update them. This is really annoying and time consuming.

我的方法是:

添加一个div新闻/链接应该是:

Adding a div where the news/link are supposed to be:

<div class"news"></div>

并在所有文件中加载JS文件。在 window.onload()时,JS会做的是写新闻:

and load a JS file in all files. Upon window.onload(), what the JS will do is writing the news:

document.getElementByID('news').innerHTML=....

因此,每次有新的链接/新闻时,我都会将它添加到JS文件中,它将写在所有网站的页面中(因为它们都会加载这个脚本)。

Thus, every time there is a new link/news, I will add it to the JS file, and it will be written in all site's pages ( because they all will load this script).

我的问题是:
这种方法可以吗?以这种方式生成的新闻/链接是否会被(Goggle)看到?

My Question is: Is this approach ok? Will the news/links that are generated this way be seen by (Goggle)?

PS
我读过很多文章,例如
https://stackoverflow.com/questions/11989908/can-google -crawl-links-generated-on-the clientide-eg-knockout

Googlebot没有看到jquery生成的内容

http://support.google.com/webmasters/bin/answer。 py?hl = en& answer = 174992

谷歌是否抓取javascript?

https://developers.google.com/webmasters/ajax-crawling/docs/getting-started

等等......但是真的很困惑...
我没有使用任何AJAX或服务器端编程。
只想用预定义的新闻列表做一个简单的 .innerHTML =...,以节省大量时间。这个内容会被谷歌索引和看到吗?

and more.... But got really confused... I am not using any AJAX or server side programming. Just want to do a simple .innerHTML ="..." with a predefined list of news, to save a lot of time. Will this content be indexed and seen by google?

非常感谢!

推荐答案

一般来说,没有。谷歌(和其他机器人)不会看到你动态添加的内容。

Generally, no. Google (and other bots) will not see content that you add dynamically.

他们当然正在学习搜索引擎以便越来越多地了解它,它可能会认识到某些特定的内容。已经向页面添加内容的方法,但是为了能够看到任何动态内容,它必须在沙盒环境中实际执行脚本,或者模拟脚本执行,以找出它的作用。

They are of course learning the search engine to understand more and more, and it probably recognises some specific ways to add content to the page already, but to be able to see any dynamic content it would have to actually execute the script in a sandboxed environment, or emulate the script execution, to find out what it does.

即使它确实看到了一些动态内容,它也可能会使该内容的优先级降低,因此您最好将重要内容作为页面中的实际元素。

Even if it does see some dynamic content, it's likely that it gives that content lower priority, so you are always better off by putting your important content as actual elements in the page.

这篇关于可以google抓取javascript生成的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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