AJAX No-Nos
I've seen the following piece of code float on Prototype's mailing list today. Note that I do not want to bash on however wrote this script (I'm sure his intentions were clean), it is just a fairly good example of a total misuse of AJAX, more akin to black-hat SEO than to webdesigners:
<div id="search-engines">content for search engines</div>
<div id="humans"></div>
var ajaxSupport = (Ajax.getTransport()) ? true : false;
if (ajaxSupport) {
$('search-engines').update();
window.setTimeout("Ajax.Update('humans')", 500);
}
The idea behind it is to display an initial page only visible to search engines (...and earlier browsers) which is immediately updated with alternate content by an AJAX request (for humans to read).
Not only might such a solution get you in trouble with search engines (bmw.de ban anyone?) it is also obtrusive and barely accessible.
What surprised me and motivated this post rant is the fact that no one on the mailing list warned that person against using such a script and that I was accused of spreading FUD when advising that such techniques were frowned upon by search-engines (for good reasons, it's just plain bad practice) and could get your site banned from their listings.
JavaScript (Thanks to AJAX) has a much better reputation today than it ever did. Please, let's not tarnish it by using it in questionable ways.