I've been working on a site that uses jQuery heavily and loads in content via AJAX like so:

我一直在一个使用jQuery的网站上工作,通过AJAX加载内容,比如:

$('#newPageWrapper').load(newPath + ' .pageWrapper', function() {
    //on load logic
}

It has now come to my attention that Google won't index any dynamically loaded content via Javascript and so I've been looking for a solution to the problem.

现在我注意到谷歌不会通过Javascript索引任何动态加载的内容,所以我一直在寻找这个问题的解决方案。

I've read through Google's Making AJAX Applications Crawlable document what seems like 100 times and I still don't understand how to implement it (due in the most part to my limited knowledge of servers).

我已经阅读了谷歌的AJAX应用程序爬虫文档100次了,但我仍然不知道如何实现它(主要是因为我对服务器的了解有限)。

So my first question would be:

我的第一个问题是

  • Is there a decent step-by-step tutorial out there that documents this from start to finish that you know of? I've tried to Google it and I'm not finding anything useful.
  • 是否有一个好的一步一步的教程来记录你所知道的从开始到结束的过程?我试过了,但没有发现任何有用的东西。

And secondly, if there isn't anything out there yet, would anyone be able to explain:

第二,如果还没有任何东西,有人能解释吗?

  1. How to 'Set up my server to handle requests for URLs that contain _escaped_fragment_'

    如何“设置我的服务器来处理包含_escaped_fragment_的url请求”

  2. How to implement HtmlUnit on my server to create an 'HTML snapshot' of the page to show to the crawler.

    如何在我的服务器上实现HtmlUnit来创建页面的“HTML快照”以显示给爬虫。

I would be incredibly grateful if someone could shed some light on this for me, thanks in advance!

如果有人能给我解释一下,我会非常感激的,提前谢谢!

-Ben

3 个解决方案

#1


2

The best solution is to make a site that works with and without JavaScript. Read articles on Progressive enhancement.

最好的解决方案是创建一个不使用JavaScript的站点。阅读关于渐进增强的文章。

更多相关文章

  1. 【问题解决方案】ImportError: No module named 'pygal'
  2. Python 黏包及黏包解决方案
  3. Python网页静态爬虫
  4. python学习笔记(3)--爬虫基础教程1
  5. Python爬虫二(Urllib库的基本使用和高级用法)
  6. 安装Python及爬虫入门介绍
  7. 【python网络爬虫三】爬取动态数据及数据入库
  8. python爬虫爬取wallpapers最新壁纸
  9. python爬虫:爬取豌豆荚APP第一页数据信息(selenium)

随机推荐

  1. Android Handler机制11之Handler机制总结
  2. Android 中文 API (40) ―― RatingBar
  3. ANDROID的MANIFEST.XML文件字段解析
  4. Android中UI设计的一些技巧!!!
  5. Android基础之相关参数区别
  6. SQLite 数据库 WAL 工作模式原理简介
  7. 编译osg for android
  8. 视频教程-Android(安卓)IM 即时通讯实战
  9. Android 待机时间
  10. Android应用程序框架