Welcome to WebmasterWorld Guest from 54.158.54.179

Forum Moderators: open

Message Too Old, No Replies

Using AJAX to open pages

AJAX and Google SEO

     
7:32 am on Nov 21, 2011 (gmt 0)

5+ Year Member



I just started using AJAX for my site and I am able to load some content in a div using Ajax. I am using <a href="url" onClick="request(url)">Link</a> in the page.

I am wondering if it is the right way to load pages using AJAX. Is it ok for google if I use such links? By the way, the href url, if for NON-AJAX browser and NON-HTML5 browsers. It has the same content that I load using AJAX. Does Google consider this cloaking?

Thanks.
10:59 am on Nov 22, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



It's not considered cloaking but what you could do is to have the same html and use ajax at the same time, for example:

<a href="http://www.example.com/page1.html" class="example_class">Link</a>

A click event is fired when the link is clicked so you can hook the example_class and can send the ajax request by retrieving the href attribute right then. See how jQuery operates so you can have the exact same html for both ajax and non-ajax browsers. js can be totally transparent to spiders.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month