Frame-Buster: Best. Javascript. Ever.

OK, Sammy’s Myspace Friends Javascript was pretty freaking cool. So what is this Frame-Buster Javascript and what’s so great about it?

How many of you have been the victim of Google Image searches?

I say victim because we’ve tracked how poorly this bandwidth suck converts into any kind of cash.

If you’ve ever used Google Image search you know how the deal. Google first displays ~20 thumbnails of images. If a surfer clicks on the thumbnail she is brought to a page with a thumbnail of your image in a frame above your page. This frame says “See full-size image” and gives the URL of your image. This way, the surfer can view your image without the bother of looking at your site.
Goole Images is a Bandwidth Leech
This kind of traffic does nothing but leech bandwidth – it is traditionally the worst kind of traffic you can have on your site (it’s as bad as exit traffic from a pop-under).

Until now.

Now, doesn’t use many images. As such we don’t have much image traffic. But do a Google Image search for “SEO black hat” and click on one of our 2 image thumbnails to see what happens.

Instead of that bandwidth leeching frame, you are redirected to the page the image came from without a frame.

Now this doesn’t matter much for sites with minimal Google Image traffic, but for some of our adult sites this is huge. If you have any kind of image search traffic, this Frame Busting Javascript will help you monetize it:

<script language=”JavaScript1.1″ type=”text/JavaScript”>if (parent.frames.length
> 0) top.location.replace(document.location);</script>

Just put that script in your header and you’re done!

Both comments and pings are currently closed.

15 Responses to “Frame-Buster: Best. Javascript. Ever.”

  1. scrunter says:

    Doesn’t seem to work here. I still get the framed version. I’m in the UK.

  2. DelD says:

    Excellent! SEO Blackhat Dude, you rock!

  3. QuadsZilla says:

    anoyne else getting the framed version in the UK?

  4. Duncan says:

    Works ok from Google australia.

  5. wibblewobble4321 says:

    Works for me in the UK

  6. Great tip. My google image traffic has been increasing lately 🙂 Take care…/ HART

  7. scrunter says:

    Perhaps I’m doing something really stupid 🙂

    Here’s a screenshot of the image search results page, showing at #2 and #3:

    I then click on result #2 (the chessboard image), which takes me to this framed page:

  8. QuadsZilla says:

    LOL nice image host!

    Perhaps you have some security setting on your browser that prevents the javascript from running? What browser are you running? What OS?

  9. scrunter says:

    Aha! Interesting. It works in Firefox 🙂
    It didn’t work in the latest Safari (2.0.2). My OS is OS X 10.4.3.

  10. […] Auf SEO BlackHat wurde nun vor kurzem eine möglichkeit beschrieben diesem Spuk ein Ende zu machen. Mittels eines Java-Script Framebrechers bekommt man den besucher komplett und vorallem direkt auf seine Seite. Gerade für Seiten die hohes google-image referer aufkommen haben eine wirklich sinnvolle Sache. […]

  11. I have found many tools for google here :

    Here find google cache bot

  12. […] I think much of the traffic to one of my swimwear sites may come from google images. SEO black hat has an excellent code snippet which can be inserted into your header that will automagically unframe your content, returning the traffic that G is stealing. […]

  13. ponfar says:

    For those having trouble with the code….

    I find that when I cut and past it to my editor the double quotes get turned into other characters.

    I’m sure this is my editor software’s fault not SEOBlaack Hat.

    Double check your code after cut and paste.

  14. DickH says:

    Paste to note pad first. Then cut/copy from notepad into your HTML editor. No problems that way.

  15. […] At first I tried this code found on but it was not working on the site. […]