The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Web Design
    4. Google text-only vs rendered (index and ranking)

    Google text-only vs rendered (index and ranking)

    Web Design
    2 2 412
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cpawsgo
      cpawsgo last edited by

      Hello, can someone please help answer a question about missing elements from Google's text-only cached version.
      When using JavaScript to display an element which is initially styled with display:none, does Google index (and most importantly properly rank) the elements contents?

      Using Google's "cache:" prefix followed by our pages url we can see the rendered cached page.

      The contents of the element in question are viewable and you can read the information inside.

      However, if you click the "Text-only version" link on the top-right of Google’s cached page, the element is missing and cannot be seen.

      The reason for this is because the element is initially styled with display:none and then JavaScript is used to display the text once some logic is applied.

      Doing a long-tail Google search for a few sentences from inside the element does find the page in the results, but I am not certain that is it being cached and ranked optimally... would updating the logic so that all the contents are not made visible by JavaScript improve our ranking or can we assume that since Google does return the page in its results that everything is proper?

      Thank you!

      1 Reply Last reply Reply Quote 0
      • TomVolpe
        TomVolpe last edited by

        Hi,

        Google is quite clever at distinguishing what your code does and since you can search for the sentence inside the hidden element and find the page, it is being indexed.

        What you’re seeing in the Google cache is what a user without javascript enabled would see, so it’s personal choice if you think this is a problem for your site or not. But if Google thinks your site has poor usability for non-js browsers your rankings may be impacted.

        There are a few things you could do if you wanted to fix this:

        1. Remove the hide class from your code and have javascript add this class so only users with javascript enabled will have the content hidden from them, leaving it visible to crawlers and in your text-only cache.

        2. Google recommends using

        <noscript>tags to display content that is dynamically added by javascript. I know your js is not adding the content, just displaying it, but it will have the same effect in the text-only cache – your content will be visible both with and without javascript enabled.</p> <p>Hope this helps,</p> <p>Tom</p> <p> </p> <p> </p></noscript>

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post
        • Why did Google Index a weird version of my blog post?
          RyanMeighan
          RyanMeighan
          0
          3
          71

        • Why Is Google Showing My Images Upside Down in the Index?
          AliMac26
          AliMac26
          0
          3
          289

        • When rel canonical tag used, which page does Google considers for ranking and indexing? A/B test scenario!
          0
          1
          45

        • Organization name as text vs. as a picture with alt text + Schema.org markup
          BlueprintMarketing
          BlueprintMarketing
          1
          6
          587

        • Google Indexing Multi-Store Best Practice
          Andy.Drinkwater
          Andy.Drinkwater
          0
          4
          104

        • Google tag manager on blocked beta site - will it phone home to Google and cause site to get indexed?
          Nobody1596916721222
          Nobody1596916721222
          0
          4
          234

        • Getting ranked on google
          skehoe
          skehoe
          0
          8
          396

        • Why is site not being indexed by Google, and not showing on a crawl test??
          StalkerB
          StalkerB
          0
          6
          1.4k

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy