jquery load() and SEO - anyone got a decent answer?

后端 未结 4 1169
迷失自我
迷失自我 2021-01-12 10:56

Many aspects of my site are dynamic. I am using jquery.

I have a div which once the DOM is ready is populated using load().

Then if a button is clicked, usin

相关标签:
4条回答
  • 2021-01-12 11:01

    Here is a guidelines how to make Google to crawl content loaded with ajax: http://code.google.com/web/ajaxcrawling/docs/getting-started.html

    0 讨论(0)
  • 2021-01-12 11:02

    None of the content loaded via JavaScript will be crawled.

    The common and correct approach is to use Progressive Enhancement: all links should be normal <a href="..."> to actual pages so that your site "makes sense" to a search spider; and the click() event overrides the normal functionality with load() so normal users with JavaScript enabled will see the "enhanced" version of your site.

    0 讨论(0)
  • 2021-01-12 11:02

    I use jquery load() asynchronous page load. It greatly improves user experience, but not seo-friendly. Here's the only solution I have found so far:

    1. On first load I do not use jquery load() and try to write cookie with javascript.document.cookie = 'checkjs=on';

    2. On next page load if php script finds this cookie it means that javascript is enabled and jquery load() can be used. If there's no such cookie then javascript is off (probably spider came), so jquery load() is not used.

      if (!$_COOKIE['checkjs'] || $_COOKIE['checkjs']!='on'){echo 'js is off, hello Google!'; } else {echo 'js is on, can use jquery load';}

    This way I can be sure that most of users can benefit from asynchronous page blocks load, exept for the very first load. And spiders get all content too.

    In your case you could just load the same page with new parameter that makes another tab active. Spider is gonna be happy.

    0 讨论(0)
  • 2021-01-12 11:08

    If your content is navigable when JavaScript is turned off, you'll be a good ways toward being visible to search engines.

    Note that search engine crawlers won't be submitting any forms on your site, so if you have any or elements that are meant to be navigating between your site's content pages, that content is not navigable by search engines.

    0 讨论(0)
提交回复
热议问题