I'm working on an AJAX-based application and thinking of how to make it crawlable by search engines. I've read the Google's AJAX crawling specification but I couldn't get my head around one thing: if my application uses exclusively pushState (i.e. no hashbangs in URLs at all) wouldn't it be easier just to return a static version of the request URL if the request's user agent was a crawler? Would that be considered cloaking? I mean, I have no problem following the AJAX crawling specification and use
<meta name="fragment" content="!"> along with
_escaped_fragment_ urls, but it seems a lot easier just to check the user agent in such a case.
I'm aware that returning information based on the request's user agent is often associated with black hat SEO, but in this case, unless I'm missing something, checking for a specific URL ( _escaped_fragment_) seems to be the same thing as checking for a specific user agent. In both cases I'd have to generate and return a static version of the requested resource and I could do bad things if I had bad intentions. AFAIK, no option is safer than the other.
Should I, by all means, stick to the specification or would it be okay to use the user agent info? Or is there a better way to make crawlable a web application that uses
Any clarification on this matter will be much appreciated.