Welcome to WebmasterWorld Guest from 54.144.72.150

Forum Moderators: open

Message Too Old, No Replies

Javascript redirect

     
8:36 pm on May 21, 2008 (gmt 0)

New User

5+ Year Member

joined:May 19, 2008
posts:11
votes: 0


Does anybody know whether google can see javascript redirects?

I intend to use this code:

<script type="text/javascript">
<!--
window.location = "http://www.example.com/"
//-->
</script>

8:44 pm on May 21, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Google reads and follows straightforward links in JS, but it does not "execute" the code. Client-side JavaScript is not appropriate for cloaking, and won't work (I assume that's why you posted here).

Effective cloaking requires server-side solutions, and you must "keep up" with *all* of the search engine's IP address ranges and user-agents (some of which are exact browser user-agent spoofs).

Jim

9:29 am on May 22, 2008 (gmt 0)

New User

5+ Year Member

joined:May 19, 2008
posts:11
votes: 0


Thanks for reply,

I was intending to redirect real visitors to a different page but google would read the page and hopefully not realise that the page redirected. :)

-Joe

8:56 pm on May 22, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 22, 2001
posts:2450
votes: 0


That's not a very effective technique to use for Google. It's a good way to suffer a penalty.
3:26 pm on May 23, 2008 (gmt 0)

Administrator from US 

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 25, 2005
posts:14624
votes: 88


Google is even able to detect some obfuscated javascript which spammers/hackers use to redirect you to their actual site such as:

<script type="text/javascript">
<!--
eval( unescape( "%20... bunch of junk here..." ) );
//-->
</script>

You can try to hide it this way, it used to work pretty good, but not so much anymore.

8:43 pm on June 29, 2008 (gmt 0)

New User

5+ Year Member

joined:June 29, 2008
posts:9
votes: 0


Google sees EVERYTHING!

So if you think that you can hide a CD's worth of your fave group in your web space to share with your mates, think again as you are sharing it with the world.

Nothing in the google world is hidden, I spent about 3 weeks google hacking as its called. I didn't need to touch p2p networks for a while!

12:23 am on July 1, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


*** I was intending to redirect real visitors to a different page but google would read the page and hopefully not realise that the page redirected. :) ***

Ooops. FAIL.

Google specifically warns to NOT do this. It comes in the section about "sneaky redirects".

11:23 pm on Sept 19, 2008 (gmt 0)

Full Member

5+ Year Member

joined:Sept 11, 2007
posts: 303
votes: 0


server side calling of a JS is better idea rather to display on the page.