SEO Safe Random Image Script?

Discussion in 'Search Engine Optimization' started by analyticsjack, Jul 10, 2008.

  1. #1
    Hello,

    Thanks for any help in advance.

    I am currently using the following script on multiple pages of our sites, including the homepage. Can anyone tell me if this script is SEO safe, and if not, where I could get a similar script that is just as easy to use?

    (no links or images are added to the script below obviously)

    <DIV align=center>
    <TABLE width="100%" border=0>
    <TBODY>
    <TR>
    <TD>
    <DIV align=center>
    <DIV align=center></DIV>
    <SCRIPT language=JavaScript>
    <!--
    /*
    Random Image Link Script
    By Website Abstraction (http://www.wsabstract.com)
    and Java-scripts.net (http://www.java-scripts.net)
    */
    function random_imglink(){
    var myimages=new Array()
    //specify random images below. You can have as many as you wish
    myimages[1]=""
    myimages[2]=""
    myimages[3]=""
    //specify corresponding links below<br>
    var imagelinks=new Array()
    imagelinks[1]=""
    imagelinks[2]=""
    imagelinks[3]=""
    var ry=Math.floor(Math.random()*myimages.length)
    if (ry==0)
    ry=1
    document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')
    }
    random_imglink()
    //-->
    </SCRIPT>
    </DIV></TD></TR></TBODY></TABLE></DIV>

    Thanks again.
     
    analyticsjack, Jul 10, 2008 IP
  2. RankSurge

    RankSurge Banned

    Messages:
    273
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Nothing wrong with the script - just be sure to post the code in a separate file on the root level of your server (ex: domain.com/js) place all your code in there and call your js from the page as one line of code:

    <SCRIPT language="JavaScript" src="js/scriptname"></script>

    That way your js only takes up one line of code and the search engine can get to your content faster.
     
    RankSurge, Jul 10, 2008 IP
  3. analyticsjack

    analyticsjack Peon

    Messages:
    83
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Awesome,

    Thank you very much.

    I really appreciate you taking the time to help out.
     
    analyticsjack, Jul 10, 2008 IP