I am working on a web site which loads its data via AJAX. I also want that the whole web site can be crawled by search engines like Google and yahoo. I want to make two versions of the site...
How can I identify a Crawler?
You should not present a different form of your website to your users and a crawler. If Google discovers you doing that, they may reduce your search ranking because of it. Also, if you have a version that's only for a crawler, it may break without you noticing, thus giving search engines bad data.
What I'd recommend is building a version of your site that doesn't require AJAX, and having prominent links on each page to the non-AJAX version. This will also help users who may not like the AJAX version, or who have browser which aren't capable of handling it properly.