Google crawling, AJAX and HTML5

时光总嘲笑我的痴心妄想 提交于 2019-12-11 13:30:15

问题


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>

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.

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.


回答1:


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



来源:https://stackoverflow.com/questions/7611585/google-crawling-ajax-and-html5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!