Can a spider index something in a javascript?

Discussion in 'Search Engine Optimization' started by Inka, May 24, 2005.

  1. #1
    Would a spider be able to index the link in red?:

    <script language="javascript">
    var data, p;
    var agt=navigator.userAgent.toLowerCase();
    p='http';
    if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';}
    data = '&r=' + escape(document.referrer) + '&n=' + escape(navigator.userAgent) + '&p=' + escape(navigator.userAgent) + '&g=' + escape(document.location.href);
    if(navigator.userAgent.substring(0,1)>'3') {data = data + '&sd=' + screen.colorDepth + '&sw=' + escape(screen.width+ 'x'+screen.height)};document.write('<a href="http://www.countercode.com/demo" target="_blank" >');
    document.write('<img border=0 hspace=0 '+'vspace=0 src="http://www.countercode.com/demo/counter.php?i=1' + data + '">');
    document.write('</a>');
    </script>
     
    Inka, May 24, 2005 IP
  2. toddieg

    toddieg Peon

    Messages:
    252
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    spiders ignore javascript as far as i know.
     
    toddieg, May 24, 2005 IP
  3. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #3
    You could just use an existing image or a transparent gif.


    <a href="http://www.countercode.com/demo"><IMG SRC="(path to images/blank.gif" height="1" width="1" border="0" alt="Keywords go here"></a>
     
    mjewel, May 24, 2005 IP
  4. Old Welsh Guy

    Old Welsh Guy Notable Member

    Messages:
    2,699
    Likes Received:
    291
    Best Answers:
    0
    Trophy Points:
    205
    #4
    Googlebot (in one of its guises I think it is googlebot/new) can parse javascript, and pull the urls out, but you will get no link benefit from the link.
     
    Old Welsh Guy, May 24, 2005 IP