WEB Can anyone help me prevent...

Discussion in 'OT Technology' started by f/2.8L, Jul 29, 2009.

  1. f/2.8L

    f/2.8L New Member

    Joined:
    Oct 1, 2004
    Messages:
    4,762
    Likes Received:
    0
    Location:
    404
    Can anyone help me prevent a site from opening our website beneath their header? For example, if you visit this website: http://www.basista.com/galleries.shtml and click on one of the manufacturers logos, it will open the manufacturers website under this dealers header. Sort of like the way an iframe works I suppose. As a site that's being treated this way, is there any way to prevent it?

    Thanks in advance for any help or direction you can give me!
     
  2. Pepsi1975

    Pepsi1975 Mod of the Year

    Joined:
    Jan 6, 2005
    Messages:
    47,590
    Likes Received:
    1
    Location:
    Detroit
  3. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    Put this in your code:
    Code:
    <script type="text/javascript">
    if (top !== self) top.location.href = self.location.href;
    </script>
    
     
  4. f/2.8L

    f/2.8L New Member

    Joined:
    Oct 1, 2004
    Messages:
    4,762
    Likes Received:
    0
    Location:
    404
  5. f/2.8L

    f/2.8L New Member

    Joined:
    Oct 1, 2004
    Messages:
    4,762
    Likes Received:
    0
    Location:
    404
    :bowdown::bowdown::bowdown:

    Gracias!
     
  6. Pepsi1975

    Pepsi1975 Mod of the Year

    Joined:
    Jan 6, 2005
    Messages:
    47,590
    Likes Received:
    1
    Location:
    Detroit
    ahh my bad, i am so out of it, i have gotten like less than 30 hours of sleep in the last week
     
  7. f/2.8L

    f/2.8L New Member

    Joined:
    Oct 1, 2004
    Messages:
    4,762
    Likes Received:
    0
    Location:
    404
    It's all good.

    Thanks for your help guys. Much appreciated!
     
  8. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    good temporary fix.

    might not be so good in the long run. especially in the rare cases that your visitors dont have javascript enabled or anti-virus on high browser security etc
     
  9. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    Without JS or explicitly asking the user to click a link to break out of the frames, I really don't think there is a way to handle it short of asking the source site to change the link.

    And what are non-js user numbers at this point. Assuming very low?
     
  10. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    oh i should of read it all.

    i thought he was in control of that other site too
     

Share This Page