Do search engines spider javascript?

Discussion in 'Search Engine Optimization' started by SamOwen, Nov 1, 2006.

  1. #1
    I read somewhere that it's smart to include your javascript from another file, example: <script src="foo.js"></script> . Do search engine bots follow the links and index your javascript? What if you put the entire javascript code in your page; would search engine bots count this as part of your content? Do they care where you link the javascript from?
     
    SamOwen, Nov 1, 2006 IP
  2. Mong

    Mong ↓↘→ horsePower

    Messages:
    4,789
    Likes Received:
    734
    Best Answers:
    0
    Trophy Points:
    235
    #2
    i am sure they spider it but how they keep it (i don't know).
     
    Mong, Nov 1, 2006 IP
    seoindia likes this.
  3. znitch-search

    znitch-search Peon

    Messages:
    46
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    MONG, great point.. yes..
    i actually did a test a while back. i cant tell ya the url anymore but i remember the results,

    google found the html-include.js on my website BUT the html links in the html-include.js file WERE NOT followed.

    what i was trying to do is give my 300 pages ONE central java based menu bar. that way i modify ONE html page and all the pages get a fresh updated menu.

    Bad news was that the links in the java were worthless from google's perspective. none of my new pages that did not have a normal html a href were being indexed. grrr :rolleyes:
     
    znitch-search, Nov 1, 2006 IP
  4. SamOwen

    SamOwen Peon

    Messages:
    865
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    So they don't care what's in your included javascript file. Thanks.
     
    SamOwen, Nov 1, 2006 IP
  5. gigapromoters

    gigapromoters Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes, they do... My client had whole of his javascript files crawled by Google.
     
    gigapromoters, Nov 1, 2006 IP
  6. meatballsandwich

    meatballsandwich Peon

    Messages:
    14
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The reason why it's good to have your scripts in external files is to limit your page size. Lots of javascript code can dilute your page's content.
     
    meatballsandwich, Nov 1, 2006 IP
  7. seoindia

    seoindia Notable Member

    Messages:
    1,684
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    200
    #7
    what will you do by getting your java script indexed?
     
    seoindia, Nov 1, 2006 IP
    Mong likes this.
  8. leftybogs

    leftybogs Banned

    Messages:
    161
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    well as far as i know, some search engine dont read some script, so i recommend to transfer codes into external file and just link it to your web page, this is benefiacial to the spiders since they do not read scripts and CSS codes and spiders crawl only a limited size of data from the pages.
     
    leftybogs, Nov 2, 2006 IP