escape from frames, java, how to?

Discussion in 'HTML & Website Design' started by sandrodz, Nov 25, 2009.

  1. #1
    hi, I'm using this code to escape from iframe,

    but it's very slow, page loads, and then reloads! is there a more elegant fast solution?
     
    sandrodz, Nov 25, 2009 IP
  2. jmpf

    jmpf Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    typically problems like this have different solutions then you'd think of naturally..

    can you describe why you are trying to escape an iframe to begin with? I suppose someone is using your content on their page and you don't want them ot use it??

    with more information I can probably give you a much better answer
     
    jmpf, Nov 25, 2009 IP
  3. sandrodz

    sandrodz Peon

    Messages:
    1,482
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have allot of images ranking high in google... I hate their framing :)
     
    sandrodz, Nov 26, 2009 IP
  4. jmpf

    jmpf Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    well you are not going to stop google from indexing your images by trying to break them out with javascript -- javascript is a client-side language and will only affect systems that run it

    I don't know whether this is true or not, perhaps someone here on the board can confirm but have you tried surrounding your images
    with hrefs that look like this?

    <a href="#" rel="nofollow"><img src=""/></a>
     
    jmpf, Nov 27, 2009 IP
  5. sandrodz

    sandrodz Peon

    Messages:
    1,482
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #5
    no, disallowing google to index images will be stupid. It's great traffic for a photo site, I just don't want my site displayed in google frame. anyways, thanks for answers, I figured it out myself.
     
    sandrodz, Nov 29, 2009 IP
  6. Ashtone

    Ashtone Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Sandrodz, could you let us know your solution please?

    I thought google would just cache the image and shove you in a frame, then once your frame is loaded, you can execute the javascript like this:

    <script type="text/javascript">
    <!--
    if (top.location.href != self.location.href)
    top.location.href = self.location.href;
    //-->
    </script>
     
    Ashtone, Nov 29, 2009 IP