Do search engines read Javascript stuff?

8 replies
  • SEO
  • |
Hello,

Anyone any idea how much (if at all) the search engines take notice of Javascript? I was just looking at some of the pages that are supposed to have backlinks to my site, and I noticed that one has my link in a Javascript file which is called from the main page. Another has the link inside a document.write() call in some Javascript.

In both of these cases, if the SEs ignore Javascript, then these links are useless to me. If they don't ignore Javascript, any idea how much they bother parsing the script?

Thanks
#engines #javascript #read #search #stuff
  • Profile picture of the author bgmacaw
    My observation is that they ignore links in Javascript in most circumstances.

    Of course, human reviewers may notice them should your site be inspected in that manner. So, if you're doing anything "interesting", like hiding text or creating a gateway page, then it might be noticed.
    {{ DiscussionBoard.errors[1796788].message }}
    • Profile picture of the author paulgl
      I doubt they would give any credence to anything in the javascript
      code, as they are not really links, but are part of the text of the code.
      It would just be text, not links. Similar to many meta tags that have
      such things in them, and html like <!--- anything here is ignored by the
      browser and I doubt if it counts for anything.

      And on a side note, for what a javascript shows....

      The reason that links in javascripts don't show up is
      that the javascript code is seen, not what is generated.

      Two examples off the top of my head that everyone is
      familiar with, is banner exchanges and even google
      adsense. Load a page with google adsense then view
      the source code. What you see is the javascript code,
      not the links.

      Any script that changes what the browser shows, but not
      the html code, will show just the code, not what is generated.
      Hence, search engines will not see them as they only look at
      the code.

      That's why people who fuss over some rss feeds that are javascripts,
      thinking they are getting links, but in reality they are not.

      Before anybody screams, php is a different animal entirely.

      Paul
      Signature

      If you were disappointed in your results today, lower your standards tomorrow.

      {{ DiscussionBoard.errors[1797050].message }}
      • Profile picture of the author MrYossu
        Originally Posted by paulgl View Post

        I doubt they would give any credence to anything in the javascript
        code, as they are not really links, but are part of the text of the code.
        It would just be text, not links. Similar to many meta tags that have
        such things in them, and html like <!--- anything here is ignored by the
        browser and I doubt if it counts for anything.
        That's what I thought, but I'm not 100% convinced it's true.

        A browser ignores HTML comments, but a search engine is perfectly capable of reading them. Whether they would or not is another story

        Same goes for Javascript. The SEs could ignore it, or they could choose to examine it.

        Originally Posted by paulgl View Post

        And on a side note, for what a javascript shows....

        The reason that links in javascripts don't show up is
        that the javascript code is seen, not what is generated.
        My only question was whether the SEs made any attempt to work out what the Javascript was doing. I know that years ago, people used to write home pages that were highly optimised rubbish, and use Javascript redirects to send human visitors to a completely different page.

        As far as I know, that doesn't work any more, which made me think that SEs had started looking at Javascript instead of completely ignoring. My question was how much they look.

        Originally Posted by paulgl View Post

        Two examples off the top of my head that everyone is
        familiar with, is banner exchanges and even google
        adsense. Load a page with google adsense then view
        the source code. What you see is the javascript code,
        not the links.
        Except that if the SE did examine the Javascript, it could do something with it, so your example isn't really a proof of anything.

        All the SE has to do is simulate running the script, and see what changes it makes to the page. This could be done, I was asking if anyone knows for sure if it is.

        I'm saying you're wrong in your conclusion, just that I'm not sure your example is a proof.

        Originally Posted by paulgl View Post

        Before anybody screams, php is a different animal entirely
        As is any server-side script.

        I guess one way to test this would be to add a Javascript link to a page that isn't linked from anywhere else, and see if the SEs follow the link. Would be fairly easy to test, and could be an interesting result.

        Thanks for the reply.
        Signature

        Turbocharge your backlinks with RSS Autopilot!
        Special Warrior Offer - Massive discount off the regular fee, and a 50% bigger site allocation!
        Try it now -> www.rssautopilot.com

        {{ DiscussionBoard.errors[1797497].message }}
    • Profile picture of the author MrYossu
      Originally Posted by bgmacaw View Post

      My observation is that they ignore links in Javascript in most circumstances.

      Of course, human reviewers may notice them should your site be inspected in that manner. So, if you're doing anything "interesting", like hiding text or creating a gateway page, then it might be noticed.
      I was thinking more of the backlink packets that people sell. You are basically creating profile pages that include links to your site. Some of these sites have "links" that seem worthless as far as getting link juice. Judging by the two replies I've had so far, it seems I'm right

      Thanks
      Signature

      Turbocharge your backlinks with RSS Autopilot!
      Special Warrior Offer - Massive discount off the regular fee, and a 50% bigger site allocation!
      Try it now -> www.rssautopilot.com

      {{ DiscussionBoard.errors[1797466].message }}
  • Profile picture of the author ramprof
    You are correct that the SEs could do something with Javascript. But they don't. There are a number of good reasons for this - one being that if the SEs actually ran the code it would open the door to a number of security concerns. I could, for example, inject malicious code.

    BTW - you really should not have the Javascript code on your page anyway. Good Web dev practices call for it in a separate .js file that you include in your header.
    {{ DiscussionBoard.errors[1798379].message }}
    • Profile picture of the author MrYossu
      Originally Posted by ramprof View Post

      You are correct that the SEs could do something with Javascript. But they don't. There are a number of good reasons for this - one being that if the SEs actually ran the code it would open the door to a number of security concerns. I could, for example, inject malicious code.
      Yeah, I wondered about that too, but I figure that if the browser manufacturers can protect themselves, so can the SEs. Bear in mind they don't actually have to run the code, they only need to simulate running it to see what output is produced.

      However, as you say, it seems that they don't.

      Originally Posted by ramprof View Post

      BTW - you really should not have the Javascript code on your page anyway. Good Web dev practices call for it in a separate .js file that you include in your header.
      Well, as I mentioned in my first post, I am not talking about my pages here, I'm talking about page on other people's sites that are supposed to have links back to my site, but do it in Javascript. I have no control over those pages, otherwise I'd have the links done as proper HTML ones!

      Originally Posted by maurellemejos View Post

      I think google can't detect javascripts..
      No disrespect, but you're definitely wrong there. Any SE can detect Javascript - that was never the question. The question was whether they would run the code.

      Javascript is (almost always) just plain text, so very easy for the SEs to read.

      Originally Posted by EyeInTriangle View Post

      From the testing I have done on several of my websites, it does not appear that Javascript is read by search engines, like Yahoo or Google.
      That saves me the bother of trying it! I was going to add a couple of JS links to a page not indexed or linked anywhere else, and see if any SEs picked up on it. Sounds like you've already done that, so I won't bother

      Originally Posted by EyeInTriangle View Post

      But, I'm not sure if and when this will change in the future. I try not to rely on Javascript invisibility long-term.
      I wouldn't rely on it at all, as it seems too grey-hat for my liking. Even if the spiders don't spot it, a human may, and that could be the end of your ratings.

      Again, my question here was about whether the back links I get from other people's sites were worth anything when they are written in by Javascript. Everyone seems to agree that they aren't, which is really all I wanted to know.

      Thanks to everyone for the replies.
      Signature

      Turbocharge your backlinks with RSS Autopilot!
      Special Warrior Offer - Massive discount off the regular fee, and a 50% bigger site allocation!
      Try it now -> www.rssautopilot.com

      {{ DiscussionBoard.errors[1811150].message }}
  • Profile picture of the author maurellemejos
    I think google can't detect javascripts..
    {{ DiscussionBoard.errors[1798494].message }}
    • Profile picture of the author EyeInTriangle
      From the testing I have done on several of my websites, it does not appear that Javascript is read by search engines, like Yahoo or Google. But, I'm not sure if and when this will change in the future. I try not to rely on Javascript invisibility long-term.
      {{ DiscussionBoard.errors[1798563].message }}

Trending Topics