How do prevent sites to be loaded in other sites frames?

Discussion in 'HTML' started by Stefan Caliandro, Feb 14, 2005.

  1. Hello,

    is it possible to avoid the site stealing and wild-linking?

    I want to prevent another site to link directly to my pages,
    so it should be possible to filter over the url referer and block this
    link hits.


    Do you have any ideas how to realize this?


    Thx
    Stefan
     
    Stefan Caliandro, Feb 14, 2005
    #1
    1. Advertising

  2. Stefan Caliandro <> wrote:

    > I want to prevent another site to link directly to my pages,

    - -
    > Do you have any ideas how to realize this?


    Remove your pages from the World Wide Web. That's a 100% certain way of
    preventing linking to them. And pages that wish to prevent linking to
    them quite often deserve that.

    Using control based on the Referer field is possible, but less reliable,
    and a lot of work (though there are surely people who would do that for
    you, for some money), and would require tools external to HTML.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Feb 14, 2005
    #2
    1. Advertising

  3. Stefan Caliandro wrote:

    > is it possible to avoid the site stealing and wild-linking?


    Not possible (reliably) to prevent linking.

    > I want to prevent another site to link directly to my pages,

    [in other site's frames, per your subject line]

    The following in the <head> section of your documents should help:

    <meta http-equiv="window-target" content="_top">
    <script type="text/javascript">
    if (top.location != location)
    // Sorry, not in YOUR frame
    top.location.href = document.location.href ;
    </script>

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Feb 14, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marcelo Birnbach [MS]
    Replies:
    0
    Views:
    3,330
    Marcelo Birnbach [MS]
    Jun 28, 2003
  2. Udo Corban
    Replies:
    0
    Views:
    3,854
    Udo Corban
    Jan 23, 2004
  3. Monty
    Replies:
    1
    Views:
    172
    Monty
    Jul 21, 2005
  4. Hennie de Nooijer
    Replies:
    0
    Views:
    175
    Hennie de Nooijer
    Feb 23, 2004
  5. Jofio
    Replies:
    3
    Views:
    111
    BootNic
    Oct 9, 2005
Loading...

Share This Page