Hi,

Can somebody tell me ways to use AJAX on my site without any side effects? Or should I avoid it completely?

Thanks in advance

Recommended Answers

All 6 Replies

Just remember that search engines don't read Javascript. So any links that are generated with Javascript won't be followed by a search engine.

Ajax is a great tool ... but like anything, you need to use it wisely. I guess the best advice I could give you here is use it when you think it will genuinely give an advantage / benefit to the site visitors, but not just for the sake of using it or necessarily for the "wow" factor.

BamaStangGuy: that's two for two :) We're just following each other around posting in the same threads at the same time, aren't we? :)

It should also be pointed out that all content made available by Ajax should also be available through non_Ajax means. This is so people who don't have Ajax-ready browsers can still use your website. In that case you site is still SE-friendly as search engines can't use Ajax. Ajax should just be used to provide a better experience at your site. It shouldn't be used as the only way to reach your content.

Asynchronous changes to the document have been possible ever since the advent of DOM scripting. Approaches can include: loading new script by creating new script element, iframes, and in IE the default Download behavior.
In many cases, and for the purposes httpwebwitch outlines, the XMLHTTPObject doesn't make things necessarily any easier than they already are. Unless the SE bot actually runs the Javascript, it cannot reliably detect the instantiation of the XMLHTTPObject. If it tries to detect via the inclusion of certain strings in the script document then this can be sidestepped very easily using a little string manipulation.

Asynchronous changes to the document have been possible ever since the advent of DOM scripting. Approaches can include: loading new script by creating new script element, iframes, and in IE the default Download behavior.
In many cases, and for the purposes httpwebwitch outlines, the XMLHTTPObject doesn't make things necessarily any easier than they already are. Unless the SE bot actually runs the Javascript, it cannot reliably detect the instantiation of the XMLHTTPObject. If it tries to detect via the inclusion of certain strings in the script document then this can be sidestepped very easily using a little string manipulation.

This is not true at a right down to your explanation of how Ajax started. It started with Microsoft introducing the XMLHttpRequest object in Internet Explorer.

And no search engine can do anything with Ajax at all at any level. They don't run JavaScript which is why it is considered so bad to use for important page feature like delivering content and site navigation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.