1

If I override default link href with onclick and ajax, for example link <a href="/mypage">, so onclick I load mypage through ajax, if javascript is disabled, or its a text browser or bot, I let go to /mypage, is this good enough for SEO as having regulat /mypage link with no javascript and ajax?

What I want is to have same content as without ajax, but to load it via ajax for better user expirience. Wonder if that can be achieved with same SEO effect?

I assume for google bot it will be the same, but this page /mypage will not appear in analytics, no referers...maybe that is the weakness of this approach?

3
  • 2
    "load via ajax" does not in itself improve user experience. AJAX can improve user experience when it updates only a part of the page rather than doing a full page reload. If you do load the exact same page as the href specifiec, you gain nothing. Your code does however become more difficult to read, which in my opinion is a bad thing.
    – LaustN
    Nov 17, 2010 at 13:07
  • @Laust: Great comment, I fully agree. You should post this as an answer, instead of a comment. Nov 17, 2010 at 13:28
  • @LaustN Ofc, it will populate some div or show popup, but the content (useful info) will be same as on new page without ajax.
    – umpirsky
    Nov 17, 2010 at 13:29

1 Answer 1

1

Whenever you serve the same content using AJAX and when JavaScript is disabled (e.g., search engine bots), you're fine. The bot will just follow the non-JavaScript URL and silently assume that the dynamically created content of the JavaScript script results in the same page (contents).

Violating this rule, e.g., serving a different page to regular users and to search engine bots, is considered black hat SEO.

UPDATE – Regarding Google et al. will follow the links to 'Ajaxified' links: there's a post about it on Google's Webmaster Central Blog. In short, when you follow a linking scheme where you update the hash part of the current URL in a style that starts with #!, Google will save these as canonical URLs and I think that URLs pointing to a page using this style will generate link juice, too.

Also read Google May Be Crawling AJAX Now – How To Best Take Advantage Of It.

5
  • Well, I know, but ajax will serve same content as content on page link points to. Is that allowed?
    – umpirsky
    Nov 17, 2010 at 12:19
  • @umpirsky: Yes, that's allowed, but why do you want to do that? Please update your question with more information about what you're trying to achieve, because I fear otherwise this question will get closed. Nov 17, 2010 at 12:22
  • What I want is to have same content as without ajax, but to load it via ajax for better user expirience. Wonder if that can be achieved with same SEO effect?
    – umpirsky
    Nov 17, 2010 at 12:53
  • 2
    @Marcel — Progressive Enhancement (which is what this is) is one of the basic good web development practises. You start with HTML and build CSS and JS on top of it to provide a better experience for those (people, robots, etc) who can take advantage of them without harming experience of those who cannot.
    – Quentin
    Nov 17, 2010 at 12:58
  • OK, now about the edited answer. That is ok, thanks. But again, probably you can get better page rank with old school non ajax links (people will share and post link, they will appear in google analitics...) then with ajax load for users that have javascript enabled. Right?
    – umpirsky
    Nov 17, 2010 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.