#1
  1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    754
    Rep Power
    124

    Using <span></span>


    I built a few pages using
    <span id="display0">Welcome</span>
    then the links are built with
    <a href="javascript:showUser('products');">Products</a>
    It appears to me that google doesn't like the links and it doesn't follow them. The robots file has
    Allow: /
    but when I view the keywords under webmaster tools of google I only see keywords contained in the home page. Is it true that google doesn't follow non-traditional links?
    Thanks,
  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,434
    Rep Power
    9645
    How is Google supposed to know what showUser('products') does? You think they parse and execute the JavaScript on every page they visit? Or even on just the links?
    Code:
    <a href="/products" onclick="showUser('products'); return false;">Products</a>

    Comments on this post

    • jalucas agrees
    • codeJ agrees
  4. #3
  5. Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Aug 2005
    Location
    Bucharest ROMANIA
    Posts
    2,524
    Rep Power
    608
    Originally Posted by requinix
    How is Google supposed to know what showUser('products') does? You think they parse and execute the JavaScript on every page they visit?
    Well, it looks like they do that recently, at least in case of AJAX Google does follow the JavaScript URLs There are still various debate on the issue, but some tests confirm that in some casese.

    But, sure, you are right. Simply writing the url as HTML as well will improve the accessibility and will help search engines.
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    754
    Rep Power
    124
    I only had 15 pages that I had to convert. When I was checking google's webmaster tools the data showed that the site was not being crawled properly. They were looking only at the index.php.

    I liked using ajax because it was very efficient but I do need google to "see" all pages.

    Thanks,
  8. #5
  9. Autodidact
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Location
    Canada
    Posts
    741
    Rep Power
    836
    This is another fine example for arguing in favour of graceful degradation and all things unobtrusive. Making your apps/sites work without JavaScript is important. Reconsider your approach. Instead of having JavaScript links, have real links that point to real pages. Once that works, then apply the JavaScript layer. Instead of having the onclick fire your function directly, have it read the URL and decide what to do with it, then cancel the default link behaviour, which is to follow the link.

    rant
    Way too many site developers are getting sloppy and think eye-catching JavaScript coolness is enough. I look down on sites that break with JavaScript disabled. It doesn't help when huge sites like Facebook only seem to encourage this sloppiness.
    /rant

    Comments on this post

    • Kravvitz agrees
    Soldiers, from the height of these pyramids forty centuries look down upon you.
    ▪ Napoleon, on the eve of the Battle of the Pyramids
  10. #6
  11. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    754
    Rep Power
    124
    Thanks for taking the time to reply.

    I simplified the pages as much as I could and I am not using Javascript. I want all search engines find my information as easily as possible. I don't know what was I thinking when I originally wrote those pages.

    Evan

    Comments on this post

    • f_nietzsche agrees : Good job
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2010
    Posts
    82
    Rep Power
    47
    My few cents.
    While you are changing all your links, make sure attribute rel="nofollow" is NOT there. That attribute might prevent crawlers to follow the links.

IMN logo majestic logo threadwatch logo seochat tools logo