Robots - embedded web client

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Robots - embedded web client

Postby Gordon » Thu May 27, 2010 9:41 am

Hi
I have solution that I want to roll out to 3000+ web sites which includes a simple registration form. In order to contain the whole process in Servoy, I have embedded the Servoy Form in and iFrame or Joomla Wrapper depending on the platform. This presents the issue of the various spiders/robots etc crawling the site and indexing the solution form. We do however want the rest of the page read but ideally not the Servoy form - does anyone know of a way of restricting this

eg
<dontlookhererobots!>
<iframe id="blockrandom" name="iframe" src="http://clipper.clickdigital.com/servoy-webclient/ss/s/Order2cash/" width="100%"height="650"scrolling="auto"align="top"frameborder="0"class="wrapper">
This option will not work correctly. Unfortunately, your browser does not support inline frames.</iframe>
</dontlookhererobots!>

There is an amusing side benefit to these forms being indexed and that is we are getting a lot of hits and high ranking on the back of it. However both we and the various clients are not too keen on this continuing !!

Best
Gordon
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 265
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK

Re: Robots - embedded web client

Postby leemcneil » Tue Jun 01, 2010 8:50 am

Your best bet is to make sure that the Servoy form path is in the exclude list in the robots.txt file.

So, your robots.txt file @ "http://clipper.clickdigital.com/" should have this in it:
Code: Select all
User-agent: *
Disallow: /

That should be enough to get it to not index the content.

However, if you don't want it to index the text within the iFrame tags (ie: This option will not work correctly. Unfortunately, your browser does not support inline frames.), you need to do that using Javascript - probably JQuery.
So, for that to work - I'd replace the iFrame with a DIV, and then add an iFrame into the DIV dynamically using Javascript. Something like:

Code: Select all
<div id="blockrandom" width="100%" height="650"></div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

<script language="javascript">
$(document).ready( function(){
    $("#blockrandom").html('<iframe id="blockrandomiframe" name="iframe" src="http://clipper.clickdigital.com/servoy-webclient/ss/s/Order2cash/" width="100%"height="650"scrolling="auto"align="top"frameborder="0"class="wrapper">This option will not work correctly. Unfortunately, your browser does not support inline frames.</iframe>') ;

}

</script>



Lee.
User avatar
leemcneil
 
Posts: 18
Joined: Fri Mar 11, 2005 4:19 am
Location: London


Return to Web Development

Who is online

Users browsing this forum: No registered users and 4 guests