通过 AJAX 抓取可搜索动态内容
我正在开发一个新的基于 html5 的作品集网站,因此我有一个 xml 文件来保存有关项目的信息。例如;每个项目的项目名称、日期、描述、位置和预览。
像这样;
<project>
<name>Project Name Here</name>
<date>September 2011</date>
<url>www.projecturl.com</url>
<description>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Nunc a augue sed ligula tempor facilisis. Curabitur in elit. Etiam dolor wisi,
consequat eget, accumsan eu, dignissim nec, est. Morbi sed wisi nec erat feugiat tristique. Fusce tempus.
</description>
<position>Design</position>
<previews>
<src>prev1.jpg</src>
<src>prev2.jpg</src>
<src>prev3.jpg</src>
</previews>
</project>
当网站加载时,它从服务器获取 xml 文件,当我从菜单中单击一个项目时,JavaScript 会从 xml 加载信息,对某些内容进行动画处理并带来有关项目的信息。
所以我的问题是 我怎样才能使每个项目页面都可以被谷歌添加书签和抓取?
谢谢
I'm working on a new html5 based portfolio site, so i have a xml file that holds information about projects. for example; project name, date, description, position and previews for each project.
like this;
<project>
<name>Project Name Here</name>
<date>September 2011</date>
<url>www.projecturl.com</url>
<description>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Nunc a augue sed ligula tempor facilisis. Curabitur in elit. Etiam dolor wisi,
consequat eget, accumsan eu, dignissim nec, est. Morbi sed wisi nec erat feugiat tristique. Fusce tempus.
</description>
<position>Design</position>
<previews>
<src>prev1.jpg</src>
<src>prev2.jpg</src>
<src>prev3.jpg</src>
</previews>
</project>
when site loaded, it gets xml file from server, when i clicked a project from menu, javascript loads information from xml, animates something and brings the information about project.
so my question is
how can i make each project page bookmarkable and crawlable by google?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果搜索引擎优化对您很重要,那么这样做是一个坏主意。 Google 确实提供了可抓取的 Ajax,但这只是有帮助你与谷歌。没有其他搜索引擎可以找到该内容,这意味着您将 1/3 的搜索引擎世界拒之门外。更糟糕的是,任何没有打开 JavaScript 的人也将无法使用您的网站。这就是为什么可爬行的 Ajax 是一个坏主意。
If SEO is important to you then doing this is a bad idea. Google does offer crawlable Ajax but that only helps you with Google. No other search engine can find that content which means you're shutting out 1/3 of the search engine world. Even worse, anyone who does not have JavaScript turned on will also not be able to use your site. This is why crawlable Ajax is a bad idea.