unframe bust

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Feather

    unframe bust

    I am designing a frameset that will display other web site's pages in one of
    my frames, and I have encountered the following code in a few web pages.

    <script language="Javas cript">
    if (top.location != self.location)
    {
    top.location = self.location.h ref
    }
    </script>

    This code reloads top.location with the other websites url and wipes out my
    entire frameset. Is there anyway to prevent this script in the other web
    site's html from NOT wiping out my frameset in both Netscape & IE browsers?

    Thanks.


  • Lasse Reichstein Nielsen

    #2
    Re: unframe bust

    "Bob Feather" <bob.feather@ve rizon.net> writes:
    [color=blue]
    > I am designing a frameset that will display other web site's pages in one of
    > my frames,[/color]

    Do you have the permission of the author of the other page? If you
    make your page public, you could easily be charged with copyright
    infringment for creating a derivative work.
    [color=blue]
    > and I have encountered the following code in a few web pages.
    >
    > <script language="Javas cript">
    > if (top.location != self.location)
    > {
    > top.location = self.location.h ref
    > }
    > </script>[/color]

    Obviously people who don't want their page framed. I guess you'll have
    to live with that. There is no way to avoid this in a general browser.

    For Netscape or Mozilla, you could probably trigger on the reading of
    top.location (which is in your page) and cause an error that stops
    execution before the assignment. I don't think IE has anything similar
    to that.

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    • kaeli

      #3
      Re: unframe bust

      In article <_TNnc.108858$G _.12547@nwrddc0 2.gnilink.net>,
      bob.feather@ver izon.net enlightened us with...[color=blue]
      >
      > This code reloads top.location with the other websites url and wipes out my
      > entire frameset. Is there anyway to prevent this script in the other web
      > site's html from NOT wiping out my frameset in both Netscape & IE browsers?
      >[/color]


      No. We put that there so people like you can't frame our sites when we
      don't want you to.

      --
      --
      ~kaeli~
      The secret of the universe is @*&^^^ NO CARRIER



      Comment

      • Matt Kruse

        #4
        Re: unframe bust

        Lasse Reichstein Nielsen wrote:[color=blue]
        > Do you have the permission of the author of the other page? If you
        > make your page public, you could easily be charged with copyright
        > infringment for creating a derivative work.[/color]

        Is there a precedent for this?
        [color=blue]
        > Obviously people who don't want their page framed. I guess you'll have
        > to live with that. There is no way to avoid this in a general browser.[/color]

        Other than turning off javascript for the domain which you want to stay
        framed.

        --
        Matt Kruse
        Javascript Toolbox: http://www.mattkruse.com/javascript/


        Comment

        • Matt Kruse

          #5
          Re: unframe bust

          kaeli wrote:[color=blue]
          > No. We put that there so people like you can't frame our sites when we
          > don't want you to.[/color]

          Which is pretty idiotic and annoying, IMO.
          My personal home page for my browser is a local file that contains a number
          of frames of sites which I visit often.

          If a site kicks me out of my frameset (which is obnoxious behavior, imo)
          then I try not to use that site anymore. Or to put that site into my
          restricted zone, so no javascript will run (which sometimes makes the site
          break anyway!)

          To me, it's on the same level as trying to popup a new full-screen window.
          Don't do it. Let the user access your site in the way which is most
          convenient to them.

          --
          Matt Kruse
          Javascript Toolbox: http://www.mattkruse.com/javascript/


          Comment

          • kaeli

            #6
            Re: unframe bust

            In article <c7oeih0311j@ne ws1.newsguy.com >, newsgroups@matt kruse.com
            enlightened us with...[color=blue]
            > kaeli wrote:[color=green]
            > > No. We put that there so people like you can't frame our sites when we
            > > don't want you to.[/color]
            >
            > Which is pretty idiotic and annoying, IMO.[/color]

            It's also irritating (and possibly illegal) to have my business site
            framed in someone else's business site as though it's their content.
            Sorry.
            No one's coding for you to take their stuff and let it work outside its
            normal context. Any already framed site could easily break when they try
            to reference top.frames, too.
            [color=blue]
            > My personal home page for my browser is a local file that contains a number
            > of frames of sites which I visit often.[/color]

            We care about non-personal use. Sorry, I can't make code that checks if
            it's on your desktop or someone else's site stealing my stuff.

            Do you try to play Playstation games on an Xbox, too?

            --
            --
            ~kaeli~
            The secret of the universe is @*&^^^ NO CARRIER



            Comment

            • Matt Kruse

              #7
              Re: unframe bust

              kaeli wrote:[color=blue]
              > It's also irritating (and possibly illegal) to have my business site
              > framed in someone else's business site as though it's their content.[/color]

              Legal problems should be solved in a legal way.
              [color=blue]
              > No one's coding for you to take their stuff and let it work outside
              > its normal context. Any already framed site could easily break when
              > they try to reference top.frames, too.[/color]

              But in most cases, referencing top.anything is not good. Relative references
              are always preferred when possible.
              IMO, a page should only care about itself and its parent. No further. So
              "top" is rarely necessary.
              [color=blue]
              > Do you try to play Playstation games on an Xbox, too?[/color]

              heh, who has time for games? :)

              --
              Matt Kruse
              Javascript Toolbox: http://www.mattkruse.com/javascript/


              Comment

              • Csaba Gabor

                #8
                Re: unframe bust

                "Matt Kruse" <newsgroups@mat tkruse.com> wrote in message
                news:c7oekm0313 0@news1.newsguy .com...[color=blue]
                > Lasse Reichstein Nielsen wrote:[color=green]
                > > Do you have the permission of the author of the other page? If you
                > > make your page public, you could easily be charged with copyright
                > > infringment for creating a derivative work.[/color]
                >
                > Is there a precedent for this?[/color]

                All I can think of right now is hotmail. If you see a link in hotmail,
                Microsoft is tracking you when you click on it (you haven't left
                hotmail - look at the url you get). And anywhere you go to from
                there is within their frame.

                Csaba Gabor
                [color=blue][color=green]
                > > Obviously people who don't want their page framed. I guess you'll have
                > > to live with that. There is no way to avoid this in a general browser.[/color]
                >
                > Other than turning off javascript for the domain which you want to stay
                > framed.
                >
                > --
                > Matt Kruse
                > Javascript Toolbox: http://www.mattkruse.com/javascript/[/color]


                Comment

                Working...