Go Back   Webmaster Forum > Forum Archives > Cyber-UG Forum Archive
REMOVE the ads below !
 
 
LinkBack Thread Tools
  # 1 (permalink)
Old
Newbie
Posts: 0
Join Date: Jun 2007
iTrader: (0)
Iframe breaker - 06-11-2007

Hi,
does anyone know the code that breaks iframes ?

Ex: I have my site at mysite.com
And I added the iframe breaker in it.

Someone puts my site in an iframe at their site, the iframe breaker will automatically remove my site from the iframe and show it fully in the page.
I just wanna prevent people from putting my site in iframes

Does anyone know how ?
Thank you
  # 2 (permalink)
Old
Junior Geek
Posts: 65
Join Date: Feb 2007
iTrader: (0)
Re: Iframe breaker - 06-15-2007

thats easy to do with javascript
Quote:
<script>
//By godkillah phantom-designs.net and cyber-ug.net
if(location.href!=top.location.href){
top.location.href=location.href
}
</script>
it works simple, it check for the url of the current page and the url in the addres bar. if these are not the same than the page must be framed and it goas to the actual url
  # 3 (permalink)
Old
Newbie
Posts: 0
Join Date: Jun 2007
iTrader: (0)
Re: Iframe breaker - 06-18-2007

Oh cool
Thanks a lot
I must put it on the top right ?
  # 4 (permalink)
Old
Newbie
Posts: 0
Join Date: May 2007
iTrader: (0)
Re: Iframe breaker - 06-19-2007

Hmm...javascript's all nice and all, but this still isn't foolproof. What if the user has Javascript turned off? Then they won't be redirected to your site and will still be within the other website's iframe.

[hum] Most unfortunate.

And yeah, you'd put it on the top. Between the head tags, I'd think.
  # 5 (permalink)
Old
Junior Geek
Posts: 65
Join Date: Feb 2007
iTrader: (0)
Re: Iframe breaker - 06-19-2007

wherever you put it it will work,
impossible in php so far i know?

anyway glad ya like it
  # 6 (permalink)
Old
Newbie
Posts: 14
Join Date: May 2007
iTrader: (0)
Re: Iframe breaker - 06-23-2007

Please do a google search on it
there are many and free
  # 7 (permalink)
Old
Newbie
Posts: 0
Join Date: Jun 2007
iTrader: (0)
Re: Iframe breaker - 06-30-2007

many what ? codes ?
i think i was just asking for an if function.

and free ? please, this is not a complex code to be needing to be free lol
  # 8 (permalink)
Old
Newbie
Posts: 42
Join Date: May 2007
iTrader: (0)
Location: Kanpur
Re: Iframe breaker - 06-30-2007

hey can anybody tell me how to create iframes ? plzz
  # 9 (permalink)
Old
Junior Geek
Posts: 65
Join Date: Feb 2007
iTrader: (0)
Re: Iframe breaker - 06-30-2007

<iframe src="link here" width="100%" height="100%"></iframe>
  # 10 (permalink)
Old
Newbie
Posts: 42
Join Date: May 2007
iTrader: (0)
Location: Kanpur
Re: Iframe breaker - 07-01-2007

hey god thanks +1 rep to cool thanks
 


Thread Tools




vBulletin®, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. | SEO by vBSEO | Skin developed by vBStyles.com