homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Using AJAX to open pages
AJAX and Google SEO

5+ Year Member

Msg#: 4389296 posted 7:32 am on Nov 21, 2011 (gmt 0)

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?




WebmasterWorld Senior Member 5+ Year Member

Msg#: 4389296 posted 10:59 am on Nov 22, 2011 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved