Cloaking URL's - Bad idea?

Discussion in 'JavaScript' started by EdYoung, Jan 15, 2009.

  1. #1
    Is it a bad/good idea to cloak offsite urls in the html using javascript?
    i.e.:
    Function(){
    var a = 'http://www.';
    var b = 'offsite';
    var c = '.com';
    var realURL = a + b + c;
    e.g.: document.getElementById('myID').href= realURL;}

    There are 2 reasons I want to do this: 1) If my site does not have exactly what the user wants I can offer the user a secondary search ... which is really an affiliate link to a well known affiliate-host. And 2) to reduce the number of offsite links in the html.

    Are there "bad" risks relative to crawlers by doing this?

    Thanks for your feedback!
     
    EdYoung, Jan 15, 2009 IP
  2. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #2
    1) People without javascript can not click them.
    2) I think links out count towards your pageranks and things of that sort

    I could be wrong though.
     
    crath, Jan 15, 2009 IP
  3. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #3
    that's the point though - link outs 'spill' rank hence you are advised to use nofollow. doing it via JS will have a positive effect - if any - from a SEO point of view.

    as for the old chestnut of 'users w/o javascript' - when are we going to stop building sites for people that refuse to equip themselves? tools for the job, is what i always say. if you want to go up a mountain and ski, then don't bring your skis, that's your problem, you cant expect all lifts to be accommodating and allowing you to sit as a pedestrian.

    speaking of which, when does it ever stop with supporting IE6, this bloody useless antiquated piece of crap - released in august 2001 - and still amounting to over 20% of all IE visits...

    basically - we encourage 'bad users' by trying to be too considerate instead of trying to educate and bring the standards up... and yes, i realise you cant waive off such a huge portion of your potential customers because they are too thick to upgrade their browser or tweak their settings.

    incidentally - in countries from eastern europe, IE6 users are representative of over 50% of all IE users - largely due to the fact that they tend to use illegal copies of windows and cannot upgrade... do i have sympathy? no.
     
    dimitar christoff, Jan 16, 2009 IP