Dangers of iframe?
-
I just noticed that one of our sites are "featured" on another site. The only this on this site is an iframe that has our site on it, i.e.:
<iframe name="ForwardFrameqAW52htK" src="http://www.oursite.com/subdirectory"></iframe>
This got me thinking of two question. First, is there any dangers for us to be included like this?
And, secondly, why would they do like this? To make people believe they have contents and get traffic, and after that change the contents to their own? Or anything else?
-
goodness knows why they do it
But place this javascript in the page, and it will reload the page in the parent window, in short it will redirect to your page
if(top.location.href!= window.location.href){
window.parent.location.href = "yourURL"
}That will piss them off
-
THAT is post of the month for me...pure genious

-
Thanks Rasmus, i hope he does so and gets back to us wit there reaction.
-
Wonderful solution. Don't know why I didn't think about it myself. Thanks a lot!
If anyone has the same problem and want the buster on all pages you can use:
if (top.location!= self.location) { top.location = self.location.href }
I only needed it for one page. Will be interesting to see how long they will feature us. One thing though, if the visitors of the other site has javascript disabled, this won't work.
-
Let them have the 1% that don't
-
heh. Good point

-
I have added google maps to my site in a iframe. Will that cause me seo problems?
-
no, but i wouldent put content you want to rank in a iframe
-
Amazing answer!
One question, though. How will this come across on GA? Will it show as a referral from the site with the iFrame?
-
Before the change I could see them under Traffic -> referral. I'm not sure how it will be shown now, I have to get back to you regarding that when I have gotten a couple of visitors.
-
Yes i bhlieve it will and since google follows javascript, it should be seen as a link