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. Intermediate & Advanced SEO
    4. Google and javascript

    Google and javascript

    Intermediate & Advanced SEO
    3 3 434
    • 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.
    • eddieredwood
      eddieredwood last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • Nobody1560986989723
        Nobody1560986989723 last edited by

        Why does the site need a JavaScript updater in the first place? That is, before you even consider search engines. You can load properties etc from a database using PHP and mySQL (or any other database) - you may be even have a field in your database that holds the ALT attribute.

        I think Google's getting better at reading AJAX content, but I think you have to look at the website structure and ask WHY you're using a particular technology and if that's the best user experience you can give your users.

        Twitter recently have said they are abandoning a certain JavaScript hack because it will speed up the website, so carefully consider that question first and then address the search engine question.

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

          Google attempts to execute javascript, in some cases. But it does a really awful job of it. With the code you've got, it'll ignore the script content.

          The smart change to make here would be to switch to a CSS plus javascript solution. The best solution is something like jquery, where you have an HTML list of images, then use CSS to hide the images and javascript to reveal it.

          That way, if a crawler hits the page, it sees the entire list of images and ALT attributes.

          That's called graceful degradation - it's best practices for SEO.

          While it'll take a lot of work, it's worth doing. It'll give you a long-term, SEO-friendly page that also works better for different devices.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Can Google Crawl & Index my Schema in CSR JavaScript
            seorankfuse
            seorankfuse
            0
            2
            82

          • Javascript content not being indexed by Google
            evolvingSEO
            evolvingSEO
            0
            4
            148

          • Will two navigation components (one removed by Javascript) impact Google rankings?
            Vijay-Gaur
            Vijay-Gaur
            0
            3
            58

          • JavaScript Issue? Google not indexing a microsite
            Jen_Floyd
            Jen_Floyd
            0
            9
            434

          • Can Google read my backlink in Javascript??
            Christy-Correll
            Christy-Correll
            0
            5
            2.0k

          • Google Places > Google+ business pages
            JFritton
            JFritton
            0
            2
            342

          • What is next from Google Panda and Google Penguin?
            TheGrid
            TheGrid
            0
            2
            529

          • Google Places / Google Analytics
            Aaronetics
            Aaronetics
            0
            3
            868

          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