SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Wizard Anat's Avatar
    Join Date
    Oct 2000
    Posts
    1,281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need a frame buster that can bust Yahoo

    As posted elsewhere, when Yahoo brings up my pages from www.freenaturephotos.com on its image search, it strips off the adsense ads. Their page display is via a frame, so members here suggested a frame buster. I've tried the following - but it didn't do the trick -

    <script language = "Javascript">
    if (top.location != location) top.location.href = location.href; </script>

    To see the problem, search "cat" under Yahoo images (http://images.search.yahoo.com/searc...gle=1&ei=UTF-8). The cat from my site is second from the left on the second row.
    The page it brings up -
    http://www.freenaturephotos.com/anim.../pages/Cat.htm
    Has the javascript in the head section, but it isn't working.

    I am looking for a working solution, that I can easily implement across the site (not having to specify URL's per page).


    This is a major problem for me, as images from this site are coming up high on image searched, driving a lot of "traffic" to the site through the Yahoo frames, but not generateing any revenue :S I have emailed Yahoo to complain but they sent back this long legalistic email from their lawyer saying I need to file an official (and officious) complaint via a special legalistic form they have - yikes!
    My Web Publishing Blog: B6S.net - I dofollow but don't spam!
    Follow me on Twitter
    My favorite content writer:
    Steve Snedeker

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Finland
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your frame busting works on Opera 7.54. I would however use "top.location.replace(location.href)" to overwrite frame page in browser history.

    You might have problem with browser security, I remember some browsers having trouble accessing top.location accross different hosts. To fix that you could try testing for "(self!=top)" unless you plan on using frames yourself.

  3. #3
    SitePoint Wizard Anat's Avatar
    Join Date
    Oct 2000
    Posts
    1,281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you! I don't know any javascript myself, so if you could possibly show me where to add that code change I'd be grateful.

    And no, I don't plan on using frames on the site itself.

    Thanks again!
    My Web Publishing Blog: B6S.net - I dofollow but don't spam!
    Follow me on Twitter
    My favorite content writer:
    Steve Snedeker

  4. #4
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Finland
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your code works with NS4.8/7.1/7.2, Firefox 1.0, IE5/5.5 as well, but not with IE6.

    Try this:
    Code:
    <script type="text/javascript"><!--
    if (self!=top) top.location.replace(location.href);
    --></script>

  5. #5
    SitePoint Wizard Anat's Avatar
    Join Date
    Oct 2000
    Posts
    1,281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I tried that but it doesn't work either. Maybe there's no way to bust out of Yahoo's frame??? help! I'm choking in it :S
    My Web Publishing Blog: B6S.net - I dofollow but don't spam!
    Follow me on Twitter
    My favorite content writer:
    Steve Snedeker

  6. #6
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Finland
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    See if this one works: link removed

    If it does, add this to the head section of your HTML:
    Code:
    <script type="text/javascript"><!--
    
    function buster() {
     if (self!=top) {
      setTimeout('buster2()',1000);
      if (location.replace) top.location.replace(self.location.href);
     }
    }
    
    function buster2() {
     if (self!=top) top.location=self.location.href;
    }
    
    //--></script>
    And change your <body> tag into <body onload="buster()">

    I've tested the above with Opera 7.54, Firefox 1.0 and IE6.
    Last edited by jorigami; Jan 5, 2005 at 04:54.

  7. #7
    SitePoint Wizard Anat's Avatar
    Join Date
    Oct 2000
    Posts
    1,281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is so odd! Check the page - the code is there but the page is still framed! And your test page did work for me (broke the frame away).

    http://images.search.yahoo.com/searc...gle=1&ei=UTF-8

    It's still the cat second from the left on the second row. You can view the source code and see that your code is there, but it's still now working... frames of steel! and frames that steal !
    My Web Publishing Blog: B6S.net - I dofollow but don't spam!
    Follow me on Twitter
    My favorite content writer:
    Steve Snedeker

  8. #8
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Finland
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's the security="restricted" in Yahoo! frameset. That's only supported by IE6 and cannot be overwritten, I'm afraid. Blame Microsoft for such ugly kludge and Yahoo! for using it purposely to break frame busting.

  9. #9
    SitePoint Wizard Anat's Avatar
    Join Date
    Oct 2000
    Posts
    1,281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Darn! Thanks so much for trying to help me out with this! I actually tried the adsesne code that's supposed to go with frames, but it's now showing up either. I guess Yahoo does somehow strip the page of the ads... grrrrrr
    My Web Publishing Blog: B6S.net - I dofollow but don't spam!
    Follow me on Twitter
    My favorite content writer:
    Steve Snedeker

  10. #10
    SitePoint Zealot
    Join Date
    Dec 2004
    Location
    Finland
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That security-attribute puts your page into "restricted" category (see Internet settings -> Security - > Restricted sites) where all scripts are disabled by default. That means that frame busting doesn't work, and neither do any JavaScript ads.

    If you can control headers sent by server, try adding Window-target: _top

    If that fails, you could use .htaccess to serve different page for Yahoo! search result, with text like "continue to picture". A bit nasty, but it might get you some more revenue. Normal link will do, Yahoo's security="restricted" will force new window.


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
  •