Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

Can window.location be seen

window.location, href



4:00 pm on May 9, 2005 (gmt 0)

10+ Year Member

I know search engines do not crawl javascript well (such as DHTML menus). Does anyone know / or have any idea if they can see links that use window.location.href For example--

A normal link would read:
<A href='mypage.htm'>Link Text</a>

One using window.location could read

<A href='javascript:"location.href('mypage.htm');>Link Text</a>


8:30 pm on May 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Hi Rickfb, welcome to the forums.

if you want to make sure SEs follow your JS links code them like this (if that's possible):

<a href="mypage.htm" onclick="window.location='mypage.htm';return false;">Link Text</a>

Users with JS disabled and bots follow the first one and users with JS enabled follow the second one.
If it's not possible to code them like that (in a menu) you should use <noscript></noscript> tags with your links in there.


1:46 pm on May 13, 2005 (gmt 0)

10+ Year Member

Thanks for the specific info. I KNEW this was the place to come. I work on the "wordsmithing" aspect of SEM and had the question posed to me by a collaborative by a programmer.

Featured Threads

Hot Threads This Week

Hot Threads This Month