1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Will javascript trick screw up SEO?

Discussion in 'Search Engine Optimization' started by adman_9000, Jul 7, 2005.

  1. #1
    Im currently re-doing my site, http://www.lazarusdesigns.co.uk slightly so that it displays differently based on resolution. Im using javascript to detect the res then reload the page & store the res in a cookie for the rest of the site.
    Does anyone know either
    a) a better way to do this? or
    b) whether using the javascript:location function to reload a page with an extra parameter is likely to annoy any spiders?
     
    adman_9000, Jul 7, 2005 IP
  2. boohlick

    boohlick Banned

    Messages:
    736
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Spider cannot read javascript.. put your scripts to another file..

    Use <script type="text/javascript" src="the name of your js file">
     
    boohlick, Jul 8, 2005 IP
    markkk likes this.
  3. adman_9000

    adman_9000 Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah i realise that, i just dont know if the actual process of reloading a page with an extra parameter of &res=hi the first time someone accesses my site will be thought of as 'dodgy' by any search engines...
     
    adman_9000, Jul 10, 2005 IP
  4. iloveseo

    iloveseo Guest

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Since search engines can't run the JavaScript they won't be redirected to the same page but with the parameter. So you are fine with it
     
    iloveseo, Jul 13, 2005 IP
  5. adman_9000

    adman_9000 Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    aah good point. didnt even think of it that way.
     
    adman_9000, Jul 21, 2005 IP
  6. Labcoat88

    Labcoat88 Peon

    Messages:
    192
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    FWIW, I've seen Google spider a link that was embedded in <script> tags within an HTML page. So it may not execute the javascript, but the GoogleBot will happily take what looks like a URL and try to load it. I've verified this directly by analyzing logfiles from the following code:

    HTML page contains:

    <script>
            testImage = new Image();
            testImage.src = 'myimage.gif';
    </script>
    Code (markup):
    Logfiles show that GoogleBot has linked to "myimage.gif".

    How d'ya like that?

    LC88
     
    Labcoat88, Jul 21, 2005 IP
  7. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #7
    Googlebot v2 is reputed to be able to navigate javascript links...
     
    minstrel, Jul 22, 2005 IP
  8. Labcoat88

    Labcoat88 Peon

    Messages:
    192
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yes, it would appear so. Minstrel, have you seen any other threads/blogs/info about this? I'd like to research it a bit further......

    thanks
    LC
     
    Labcoat88, Jul 22, 2005 IP
  9. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #9
    When googlebot version 2 came out (this past spring was it?), there was quite a bit of discussion about it on various forums, perhaps this one included. I can't give you actual links but I'm sure a Google search would dig them up.
     
    minstrel, Jul 22, 2005 IP
  10. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #10
    minstrel, Jul 22, 2005 IP
  11. Labcoat88

    Labcoat88 Peon

    Messages:
    192
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Interesting... I may just have to write a test page with variously-obscured URL's within JavaScript, and see what the logfiles show for GoogleBot activity. :cool:
     
    Labcoat88, Jul 22, 2005 IP
  12. Shoemoney

    Shoemoney $

    Messages:
    4,474
    Likes Received:
    588
    Best Answers:
    0
    Trophy Points:
    295
    #12
    or you could just detect the agent...
     
    Shoemoney, Jul 22, 2005 IP
  13. Labcoat88

    Labcoat88 Peon

    Messages:
    192
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #13
    actually, I meant the experiment would be to learn more about the GoogleBot... I don't really care if/whether they index the test content. Alot of rumours have circulated about G starting to evaluate JS, but there's very little detail.
     
    Labcoat88, Jul 23, 2005 IP