Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Is Framebreaker Javascript safe to use?

         

Oxydada

4:45 pm on Feb 9, 2009 (gmt 0)

10+ Year Member



Hi!
I've found my site kinda hijacked under another site frames. I was considering using a framebuster or framebreaker javascript code.
I was wondering, is this a safe option? Will Google penalize my site for doing it?

And I mean penalize my site from normal search results - I really don't care about images.

Thanks in advance for your help :)
Mia

wyweb

6:10 pm on Feb 9, 2009 (gmt 0)



I've used framebusting code on several sites for years now without noticing any ill effects.

jetteroheller

8:56 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Now it's the second time that I receive an outrageous email.

Somebody feels cought on the site, the back button does not work.

This effect is caused by Google picture search.
The page from where the picture is, is loaded into a FRAME.

But now works the frame breaker javascript code.

Trying to go with the back button back to the Google picture result page ends with own page in FRAME, frame breaker code starts to work again.

User thinks the back button is locked.

[edited by: tedster at 10:05 pm (utc) on May 17, 2009]
[edit reason] moved from another location [/edit]

tedster

10:01 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use the replace() method for your framebreaker code. That will preserve the back button's function - something along these lines:

if (top!= self) top.location.replace(self.location.href);

lavazza

10:31 pm on May 17, 2009 (gmt 0)

10+ Year Member



I like the use of a confirm box (see http://www.w3schools.com/JS/js_popup.asp [w3schools.com]) with an if/else that allows the visitor to:
  • select OK and be redirected to the 'original' site
  • select CANCEL and stay where they are

    [edited by: tedster at 11:12 pm (utc) on May 17, 2009]
    [edit reason] fix link [/edit]

  • Jonesy

    5:17 pm on May 18, 2009 (gmt 0)

    10+ Year Member Top Contributors Of The Month



    tedster,

    I am no javascripter. How would one permit framimg by certain sites while still breaking out of all other sites?

    I.e., I see visits by a foreign search/translation site which frames my web pages, but the outside frame consists of only instructions (in the foreign language) on how to use the features of the translation services.

    That framing I'm ok with. But, right now I'm breaking out of that frame because I'm frame breaking to disallow several other sites from wrapping my content in with their "advertising-rich" web sites.

    Thanks,
    Jonesy

    fishfinger

    10:35 am on May 19, 2009 (gmt 0)

    10+ Year Member



    I think you're going to have to get into cloaking to do this.

    Have a 'safe list' of bots that you show your pages to without the frame-busting script.

    Everyone else gets the standard pages with the script.