Google proposes standard for making Ajax crawlable
googlewebmastercentral.blogspot.com
googlewebmastercentral.blogspot.com
As far as I can tell, their plan is to create a standard way that AJAX hash links can be translated into real links, which Google will then crawl, expecting that you are running a machine-readable web browser on your server(!) that will render the full page.
Expecting everyone to make a big modification like installing a Java-based browser to their infrastructure is crazy.
A much more sensible solution is the one webmasters should be doing anyway: progressive enhancement. Any AJAX link, when clicked with Javascript disabled, should render the page as it was intended, just more slowly and without animations etc.. Then your site is completely indexable, and as a bonus it's more robust and accessible too.
With a modern MVC framework this is really not that hard to achieve: your AJAX controller should just be spitting out a chunk of HTML, and whether it gets integrated into your template at the server-side or on the client by Javascript should be irrelevant.
I agree. Google is (IMHO) doing this because they view GWT as the near-term future of web development and it seems likely this will be baked into the framework sometime soon (see http://code.google.com/p/google-web-toolkit/source/browse/br...). Katharina Probst and Bruce Johnson are both GWT team members, and as far as I can tell Dr. Probst is leading the engineering effort on the GWT side to support this.
It seems to me that if you're not using GWT, this will be far too much effort for you to implement.
For example, a common approach to presenting content in an AJAXy kind of way is to just put a path after the hash. E.g.
http://www.example.com#/products/bungee-cords
It's probably really easy for the web app to figure out the right content to serve up for #/products/bungee-cords, headless browser or not.I know you'll be saying, "Of course, but apps should be doing that anyway with progressive enhancement." That's all well and good, but that leads to two separate sets of URLs: one that most users see, and one that search engines see. This fixes that.
With progressive enhancement, your URLs should look like http://www.example.com/products/bungee-cords. If clicked they should render the page as appropriate. JavaScript, if enabled, will attach a handler to the links and when it sees you trying to click on /products/bungee-cords will halt that click and instead make an AJAX request for the equivalent content. There should be no need to have # links whatsoever.
It also ignores the fact that there is no way to set the URL field (through JavaScript or any other mechanism) without actually triggering a page change.
Nobody is saying everything needs to be that way. But some things do. This is an attempt to make those things work better with search engines.
There's never been a case that's gone to verdict on the matter, so its still somewhat of a gray area. But the reason they don't go to verdict is because the offending company has always agreed to a large cash settlement. Target's $6MM settlement with the Federation for the Blind is the most recent case.[1]
There's plenty of large websites that drop the ball here (e.g., Reddit), but that doesn't mean its safe to do so. Ignore accessibility at your own risk.
[1]http://www.webstandards.org/2008/08/28/what-the-target-settl...
Can you give an example of a Web application, which relies on Javascript to function, which also has content that even _should_ be indexed but is hiding behind Ajax?
Does Google need to index Backpack or something?
280 Slides the application doesn't need to be indexed. They don't need to know where the New button is. They don't need to know where the scrollers are.
But shared presentations do need to be indexed. Fortunately, it's not all that difficult to construct the content in such a way that it can be indexed. We give out unique URLs for presentations which aren't # delimited, so we could actually serve the text content alongside the viewable presentation. We don't currently, but it would be a relatively easy change.
Somewhat related: It's not AJAX, but I remember hearing Microsoft Research a couple of years ago talk about parsing CSS. They wanted the page as an image so that they could analyze pictorially what was a menu, what was a header, what was main content, etc. It seemed fairly neat for the time, although I think there are much simpler heuristics for when you are after just the main article type content of a page that will work for most blogs/CMS's out there.
(No, they didn't use IE. I asked. Yes, they tried. They said it was slow and crashed too much.)
Avi Bryant: I was just thinking of pinging you about your approach to generating html in Clamato. Are you going to be trying to unify client-side/server-side html generation to solve exactly this problem?
Some thoughts, Google suggests using a headless browser to generate the static version of the dynamic content. This may be the only option for existing code bases. But with server side javascript and by extension Clamato there must be a more elegant solution to generate clean static html as well having a dynamic UI client-side. This seems like something you would have thought a lot about while building The Seaside Framework (http://seaside.st) and now Clamato (http://clamato.net/).
I find Google's proposal goofy; I think I agree with the poster who suggested feeding google static HTML (probably via a sitemap) which references canonical URLs that might be ajaxy, rather than having it crawl an ajax site and do this magic token manipulation to get the static HTML equivalent.
The right way to do this for user experience is to to allow the user to cycle through the testimonials using AJAX. This allows for some nice looking UI and is faster because less data is exchanged with the server.
The right way to do this for SEO is to have each page with a different testimonial on it with it's own custom title, meta description, and SEO friendly URL.
Which way we go is still undecided.
Check out my company's homepage for an example: http://illuminatikarate.com/
You'll notice that when you click to our other pages the content slides in as though its all contained in the original page. But if you have JS disabled, they behave as independent pages. Google has indexed all the pages on the site separately[2], so we're getting the full SEO benefit while also maintaining user experience for our disabled customers. Its a win for everyone.
Ping me if you're having trouble, I'm happy to help.
[1] http://www.domscripting.com/blog/display/41
[2] http://www.google.com/search?q=site%3Ailluminatikarate.com
Your testimonials example is good, and is definitely a reason to promote the idea, but as with anything, I suppose there are several different angles on this. In the case that you use AJAX to drive a "linear" process (say a series of login screens), there's no advantage to having Step 5 indexed and accessible, without ever beginning at Step 1.
Worst case, we can always fall back to the flash band-aid, keep the same HTML content all on the same page, just place it -10000 off-screen where only the robots can locate it...but this, along with the "right way to do this for SEO" above are labor intensive...
Once you get the html, libraries like jQuery make the parsing and replacing very easy.
$(html).find('#testimonial').replaceAll('#testimonial');
$('#testimonial').load('/testimonial-3 #testimonial p');1. give the content behind the ajax call a static url, which can be accessed by non-js clients too
2. add something like <link rel="alternate" media="ajax" type="text/html" href="http://example.com/doc.html#state /> to the head of that static version, which the search engines can then use as a pointer to back the js version
1. Use machine learning to identify page elements likely to produce AJAX responses. Not too hard to do this, especially if you actually render the page in (say) Chrome and use the 2D layout in addition to the 1D HTML/CSS as part of your feature set.
2. Use your (souped up, ultra fast) Selenium replacement to play with all those AJAX features.
http://www.reasonablyopinionated.com/2009/01/how-to-test-aja...
...on the third hand, perhaps they're thinking that anyone technically savvy enough to set up an AJAX site (or set up sitemaps or the like) can run this headless browser.
The work of webmasters should be making the URLs available -- Google has to come up with ways to interpret the content. This is similar to asking web servers to provide an HTML version of PDF documents that they are serving.
If it is a webapp, then making it crawlable does not make sense anyway.