homepage Welcome to WebmasterWorld Guest from 54.196.195.158
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Hide <include> from spiders
need to hide
ak_web




msg:1475009
 10:51 pm on Feb 18, 2006 (gmt 0)

Hello,

I have <? include("URL")?> on page.
Is there a solution to hide this code from the spiders using JavaScript?

 

Dijkgraaf




msg:1475010
 12:45 am on Feb 19, 2006 (gmt 0)

Well that include looks to be server side PHP.
Why not do a User Agent detection there instead and make the include conditional?

Other than that, you could use a series of document.write statemnts to write out the contents you want.
You might want to check out the Cloaking [webmasterworld.com] forum.

kaled




msg:1475011
 1:18 am on Feb 19, 2006 (gmt 0)

What is the nature of the content that you wish to exclude?

Kaled.

ak_web




msg:1475012
 1:41 am on Feb 19, 2006 (gmt 0)

Thank you for responses.
There is a big peace of code in this <? include?> , including more JS and PHP, but , in general, I need to hide just one link from this code. The problem is that this link looks like <a href="url/<!--{$results}-->"> and when I'm trying to hide it with JS it doesn't work properly. That's why I decided that may be it will be easy to hide all this <? include?>

kaled




msg:1475013
 11:32 am on Feb 19, 2006 (gmt 0)

Spiders don't run javascript therefor js cannot be used to hide content from them.

Perhaps <a rel="nofollow"> is what you need.

Kaled.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved