3

I want to AJAX enable all of my "Add To Cart" buttons because search engine bots are indexing these and not paying attention to my robots file or site map. I just don't want to lose potential customers. I have seen a number of top sites using content that relies heavily on JavaScript support, including Amazon. Is it OK to follow the trend?

The rest of my site progressively degrades, but I would really like to implement this because of the benefits to the customer (instant satisfaction), my infrastructure (constant page rebuilds), and allowing me to use SEO tools to optimize without the tool picking up thousands of "Add to Cart" widgets in my catalog.

2
  • Can't you simply tell your tool to ignore URLs with some specific pattern? Commented Sep 11, 2012 at 13:21
  • How would I be able to tell if it is a real customer or not?
    – Alex Erwin
    Commented Sep 11, 2012 at 15:28

1 Answer 1

2

Since the rest of your site "progressively[gracefully] degrades" and presumably your Add-To-Cart buttons already work without AJAX, then why should your Add-To-Cart buttons become AJAX-only, when AJAX itself should be implemented as a progressive enhancement?

Since AJAX is supported by all relatively modern browsers and you are only interested in real visitors (with regards to Add-To-Cart) then it is unlikely to affect many real visitors (IMO), but why run the risk?

Your web stats should provide some indication of how many of your current visitors are (or more importantly "are not") AJAX enabled.

6
  • The majority of the real users are AJAX "Capable", what my reference is to if most users leave JavaScript on these days. The search engine bots are submitting more things to my cart than users are, and more importantly tools I use to see if my site is optimized are picking up the links to these Add-To-Cart buttons. Even though google and the tools are saying the robots.txt is OK, they are still using links disallowed.
    – Alex Erwin
    Commented Sep 11, 2012 at 15:33
  • Well, if you make it AJAX-only then there is always the risk that some users will be adversely affected. If you're a gambling man then you could always implement this and see if there is a change in your conversion rates?! :) robots.txt doesn't necessarily prevent pages from being indexed, it should, however, prevent the content of those pages being crawled. Maybe an X-Robots-Tag header would be more appropriate? Do you use "nofollow"? There is the caveat that Google is getting better and better at indexing JavaScript/AJAX generated content, so your efforts might be in vain?
    – MrWhite
    Commented Sep 11, 2012 at 16:08
  • I do use nofollow. My efforts would probably not be in vain IF... and I mean IF.... Google does not not start executing AJAX links. Two things: 1) our cart is db backed so every time a search engine submits it is using resources that it shouldn't. So I am preventing a GET HTTP REQUEST 2) A SEO like the one we are using from GoDaddy would ignore these links
    – Alex Erwin
    Commented Sep 11, 2012 at 19:21
  • I want to prevent submission for the search engines, and indexing for SEO tools. I will probably just implement this and see if it affects anything. Thanks!
    – Alex Erwin
    Commented Sep 11, 2012 at 19:22
  • 1
    Just a thought... Bots generally don't support cookies (and Googlebot certainly doesn't) so wouldn't it be possible to only allow an Add-To-Cart submission if a particular (session?) cookie is already set? Why does the "SEO tool" not respect nofollow links, what is the purpose of following them?
    – MrWhite
    Commented Sep 11, 2012 at 22:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.