homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
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

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


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



 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.


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

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



 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?>


 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.


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