谷歌抓取,AJAX和HTML5 [英] Google crawling, AJAX and HTML5

查看:126
本文介绍了谷歌抓取,AJAX和HTML5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML5可以让我们无需刷新浏览器更新当前的URL。我创建的HTML5之上的小框架,让我透明地利用这一点,所以我可以做使用AJAX同时还具有无井号标签可收藏的URL的所有请求。因此,如我的导航看起来是这样的:

HTML5 allows us to update the current URL without refreshing the browser. I've created a small framework on top of HTML5 which allows me to leverage this transparently, so I can do all requests using AJAX while still having bookmarkable URLs without hashtags. So e.g. my navigation looks like this:

<ul>
   <li><a href="/home">Home</a></li>
   <li><a href="/news">News</a></li>
   <li>...</li>
</ul>

当用户点击新闻链接,我其实框架发出AJAX GET请求(jQuery的)的页面,并取代当前的内容与检索到的内容。在此之后,当前的URL被使用HTML5的pushState()更新。然而,它仍然是同样可以只键入 http://www.example.com/news 的在浏览器,在这种情况下,内容将被同步当然前提

When a user clicks on the News link, my framework in fact issues an AJAX GET request (jQuery) for the page and replaces the current content with the retrieved content. After that, the current URL is updated using HTML5's pushState(). However, it is still equally possible to just type http://www.example.com/news in the browser, in which case the content will be provided synchronously of course.

现在的问题是,将谷歌抓取网页的这个网站?我知道,谷歌提供了一个指南用于抓取Ajax应用程序,但文章中假设井号标签用于bookmarkability,我不(要)使用#标签。

The question now is, will Google crawl the pages for this site? I know that Google provides a guide for crawling Ajax applications, but the article supposes that hashtags are used for bookmarkability, and I don't (want to) use hashtags.

推荐答案

既然你有实际的硬链接的网页和它们加载相同的内容,谷歌将抓取您的网站就好了。

Since you have actual hard links to the pages and they load the same content, Google will crawl your site just fine.

这篇关于谷歌抓取,AJAX和HTML5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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