3

I'm working on a AJAX powered web site and I decided to use Ben Alman's BBQ plugin for hashchange event.

But, with this plugin, I can't make Hashchanges for Google search (!#)

Is there any other plugin for it?

Thanks

James Allardice
  • 164,175
  • 21
  • 332
  • 312
Burak F. Kilicaslan
  • 535
  • 2
  • 8
  • 20

4 Answers4

5

There are two ways to make an ajax website SEO friendly.

  1. Graceful upgradation. This involves coding your website to work without any ajax, then merely using AJAX to gracefully upgrade the websites functionality. Example here
  2. The other way is to code your entire website in AJAX, and not care about SEO until it is too late. You can then use Google's HashBang proposal to implement a server-side hack to serve the static content for your website.

You can read more about the comparison of these two solutions here: https://github.com/browserstate/history.js/wiki/Intelligent-State-Handling

balupton
  • 47,113
  • 32
  • 131
  • 182
1

Actually you can make hashchanges for Google search (#!) with BBQ.

Download the plugin here: BBQ. Check out his page at github, too.

Unzip the folder and check out the examples. There is an example called 'fragment-ajax-crawlable' (you can get the files at github, also).

This should get you an idea how to do it (there is an extensive documentation of the plugin). Hope this helps...

drpelz
  • 811
  • 11
  • 43
1

I'm not familiar with JQuery BBQ. However, the Google Bot does not execute javascript at all. Go to your browser disable javascript and go to your site. This is what Google sees. If you want Google to see what is on your ajax site, then you are going to have to make an alternative non-javascript way of navigating to these sections of your site.

Caimen
  • 2,623
  • 2
  • 26
  • 43
  • So I guess I misunderstood all the concept on here http://code.google.com/intl/tr-TR/web/ajaxcrawling/ ? – Burak F. Kilicaslan Aug 16 '11 at 22:56
  • I have not looked into this method yet. I wonder when Google put out that documentation. It seems Google has a way you can go about this, but I have never attempted it like this and it still seems more convoluted than just creating a non-javascript version of a page. This method should require a fairly small modification in the BBQ plugin, but I don't really have time to go digging in there. Just remember that just because Google has this method for reading ajax calls, that other searches engines might not at all and may implement entireley different ways of doing this. – Caimen Aug 16 '11 at 23:07
  • How Twitter manages to make Google index this page: http://twitter.com/#!/tbwa_istanbul When I disable Javascript, it redirects me back to main page and says "Twitter uses javascript" – Burak F. Kilicaslan Aug 16 '11 at 23:07
  • you are absolutely right about it. I think other search engines don't support the same thing but having 2 or more different versions of the same content wouldn't break the rules of Google Search? – Burak F. Kilicaslan Aug 16 '11 at 23:11
  • My recommendation is to basically use the noscript tag http://www.w3schools.com/tags/tag_noscript.asp. Make your urls navigatable without javascript then when Google indexes a page have it detect weather javascript is enabled or not, if it is have it use ajax to retrieve the page. This just how I personally always try to accomplish this type of task. – Caimen Aug 17 '11 at 13:32
1

The suggested link - twitter.com/#!/tbwa_istanbul for example, is using the new way of how google CAN index htmled ajax. Htmled, i mean.. it doesn't work for json ajax.. only for loaded html code. Very interesting :)

So the answer is: Yes, google can index ajax.

Read more here: Making AJAX Applications Crawlable