Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Mar 2010
    Posts
    104
    Member #
    21316
    Liked
    1 times

    Is my ajax content crawlable with the Masonry Append method?

    Right, so I've been using the Masonry plugin to give some of my element layouts some flexibility (all the reasons why someone would use this plugin) ... but I've now decided to go a little further and attempt the append method to load an external php file when someone clicks a LOAD MORE button (I guess this method is also a "lazy load" kind of function which is half the reason why I wanted to go with this approach).


    After hours of testing / researching ways to do this (for some reason many solutions on SO didn't working for me and I also feel the Masonry documentation doesn't really explain well), I ended up coming right with the following code:

    Code:
    
    
    $('#towns').masonry({
    columnWidth: '.grid-sizer',
    itemSelector: '.town',
    gutter: '.gutter-sizer',
    percentPosition: true
    });                     
    
    $('.loadmore').click(function(){
    $.get('inc/towns.php', function( data ) {       
        var $moreBlocks = $( data ).filter('.town');
        $('#towns').append( $moreBlocks );      
        $('#towns').masonry( 'appended', $moreBlocks);
    });
    $('.loadmore').addClass("active");
    
    });


    Now my SEO concern is, when I load the contents of towns.php and click on view source, those elements aren't in the source code. I read online that that's because the source code is showing the page when it was first loaded (not dynamically later after loading more content) and someone said online (sorry I can't find the links to these websites) if you right click to inspect element and can see the ajax loaded content, then the content is really 'there' ... thus crawl-able by SE's. However I'm not convinced. I've always said to myself, if it's not in source code, then it's not there to be crawled.


    BTW - I assume that ajax loaded content and appended / prepended content is practically the same thing?


    Now, just the other day (14th October 2015) Google's article explaining Making AJAX applications crawlable was deprecated. It's an interesting read (obviously) and I still think some of the points that's spoken in that article still applies. Google said:


    "What the user sees, what the crawler sees"


    I don't know if my tired eyes are causing brain fade but the phrase "What the user sees, what the crawler sees" doesn't seem entirely correct because further down in the article, they mention that if the content cannot be seen in the source code then that content basically cannot be crawled.


    So appended content = CAN be seen by user.

    However Appended content CANNOT be seen in source code therefore it isn't there to be crawl-able.


    So it seems like their policy of "What the user sees, what the crawler sees" isn't quite true or it's just very vague (I could be wrong).


    I think what google really meant when they said "What the user sees, what the crawler sees" only applies to someone who's surfing your website with javascript disabled (that kind of 'user' - not being able to see dynamically loaded content since JS is disabled). Even though the "Making AJAX applications crawl-able" has deprecated I think this still applies.


    Further down in that article, they mention the term "HTML snapshot". Correct me if I am wrong, but in a nutshell are they basically saying that we should put a hidden link to the file-of-content-that's-ajax-controlled for SE's to follow and crawl? Then later on, they talk about "An agreement between crawler and server" which To be honest, I don't quite understand that part of it all but I assume it doesn't apply to my towns.php "link".


    This is the link to the official explanation regarding the "Deprecating our AJAX crawling scheme"



    and in that article is a link to another Google article regarding "Understanding web pages better"


    After reading all that and With all that been said... What does my situation look like in terms of my masonry-appended content being crawl-able now that NEW algorithms are about? Do I need to take any extra steps to make it SEO friendly like adding a hidden url (or did I get that completely wrong)? I just feel like this topic is a little vague as whole (probably also because I am a noob at javascript). I'm guessing this could be of some help to many others using Masonry.

    Appreciate your help in advance.

  2.  

  3. #2
    Senior Member brandMatt's Avatar
    Join Date
    Oct 2015
    Location
    St .Catharines Ontario
    Posts
    240
    Member #
    52164
    Liked
    51 times
    I don't use Ajax if the content needs to be crawlable, I have all the content served at load time, but hidden and the load more just unhides. This solution may not work in your case.

    My Web Site:
    brandwebdesign.ca
    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link. Some of us are really insecure and need those likes so that we feel important and smart, so come on, help us out, huh?


Remove Ads

Posting Permissions

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

Tags for this Thread

All times are GMT -6. The time now is 07:40 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com