SEO Friendly Ajax That Spiders

SEO That SpidersI keep seeing all the main SEO sites putting up posts about how Ajax is not search engine friendly. Which, for the most part is true. But not all the way true. There is a way to use Ajax, to make applications that are friendly to the search engine spiders. It’s all just a matter of how you write the javascript.

The problem with javascript / Ajax and search engine compatibility is not with the search engines, or even the use of javascript. The problem is in how the code is written. There is definitely a way to write spider friendly javascript. It’s called un-obtrusive javascript. Which basically means javascript that displays if the browser supports javascript, but also displays if javascript is not supported. Hence -> un-obtrusive.

There are many ways to do this besides using the common noscript tag. There is an example of such javascript on the webdev page of my other site. You can test it by going to the page, clicking around on the javascript accordion to see the javascript in action; then turn off javascript in your browser prefs, refresh the page and viola! all of the content still displays. This is the essence of un-obtrusive javascript.

You can do the exact same thing using Ajax, or XHR (Xml Http Requests) by referencing files on the server using links that don’t follow when javascript is enabled and putting the linked content on the page by appending it to the DOM (Document Object Model) with javascript. What you get then, is an Ajax application that works for the user with javascript capabilities, and for the search engine without javascript capabilities, it is simply a link to content. Ajax/javascript can be SEO and spider friendly, it’s just a matter of how it’s done!

Categories SEO

One Reply to “SEO Friendly Ajax That Spiders”

Comments are closed.