SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Dec 1999
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why???? I don't get it!!!

    Sitepoint uses the following code to detect if their site is framed and, if so, remove them.


    if (parent.frames.length > 0) {
    parent.location.href = self.document.location
    }

    Ok, I have no problem with that, but what is the advantage of doing that???. Better SE position, faster loading time, or just prevent others from framing your site???. I don't get it!!!!


    Thanks for your help.
    Moderator please feel free to move this thread if this is not the correct board.

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    northern Maine
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's just to prevent it from being framed, although a better frame-breaking code:

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

    Jason - Contact Me
    Supermoderator @ CodingForums


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •