Frame Busting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Freeway
    Confirmed User
    • Aug 2001
    • 441

    #1

    Frame Busting

    I saw the code for "Frame Busting" on a resource site a couple days ago and now I can't remember witch one. Can some post the code for me?



    NGBIN
    .com


  • Lord Assmore
    Confirmed User
    • Mar 2001
    • 588

    #2
    Here you go

    <SCRIPT LANGUAGE=JAVASCRIPT>
    <!--
    if (top.frames.length!=0) top.location=self.document.location;
    // -->
    </SCRIPT>

    Comment

    • Freeway
      Confirmed User
      • Aug 2001
      • 441

      #3
      Thanks



      NGBIN
      .com


      Comment

      • Freeway
        Confirmed User
        • Aug 2001
        • 441

        #4
        Shit. I put it before the head and it didn't work. Where am I supposed to put it to get it going?



        NGBIN
        .com


        Comment

        • Lord Assmore
          Confirmed User
          • Mar 2001
          • 588

          #5
          The placement doesn't affect the functioning of the code, only when it's executed... But place it in the page head, so you'll burst out of any frame asap.

          You can try this line of code instead, which I just made up and actually tested:

          if (top != self) top.location = self.document.location;

          Comment

          • Lord Assmore
            Confirmed User
            • Mar 2001
            • 588

            #6
            i.e. try putting it right after the first head tag <HEAD>

            Comment

            • Freeway
              Confirmed User
              • Aug 2001
              • 441

              #7
              OK, I'll try the new. thanks again.



              NGBIN
              .com


              Comment

              Working...