SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery .load seo friendly for google spiders?

    I have a question regarding SEO, when you use the .load functionality in jQuery.

    You can load a document by referring to the href value of the link you clicked.
    In this first case, the folder name where the html documents are stored (../ajax/) is mentioned in the <a> tag, not in jQuery:
    Code:
    <a href="ajax/test.html">test</a>
    
    var thelink = $(this).attr('href');
    $('#content').load(thelink);
    Or you can load a document by adding the folder name of your html documents in your jQuery and not in your <a> tag.
    Code:
    <a href="test.html">test</a>
    
    $('#content').load('ajax/test.html');
    I wonder which method is the most seo friendly.
    I now use the first example, but I noticed that the google spiders stop at my navigation, and don't go further to the other pages of the site.
    But I suppose if I try the second example, the google spiders stop aswel, because the target folder is not mentioned in the links...
    I ask it before I change all my links to let google check it.

    Anyone experience with this?

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Hi there,

    The good news is that the Google search bot is able to execute AJAX to index content.
    See here: https://twitter.com/mattcutts/status/131425949597179904

    I find it weird that method one is causing the bots to stop, but I don't think you have anything to lose by testing method two.
    See also: http://www.google.com/search?q=search+bot+ajax

  3. #3
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I now changed it to the second option, but I put all my html files in the same directory as where my index file is.
    Google crawls it without errors now:


    <a href="test.html">test</a>

    $('#content').load('test.html');


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •