How to Jump Out of Frames of Google Translate and Images

Written by Pavan Kumar on July 21, 2009


If you monitor your website stats regularly and your site is quite old and established, it mostly gets traffic from Google Images and Google Translate. Considering it in a long run, the number of impressions a website get is considerable. If you have used them, you must have observed its behavior that they include your webpage inside an iframe.

What if it is included in iframe?

There are different possibilities which I don’t like when my site is included in iframes.

  1. I use adsense allowed sites feature which is recommended safety measure to avoid misuse of ads. If my site gets included in Google Images, the url which shows my page is like…… and if the adsense get any clicks, it wont be counted.
  2. It reduces the viewing area – I use a wide screen display and many of my visitors too. Firefox itself along with windows toolbar eats up a quarter of my screen, and this Google’s frame makes another quarter and it is annoying.
  3. Extra exit links – Google image frame also has a search bar, if someone is not so happy, he don’t bother to browse and look into rest of page, he just keys in a new term and escape. I am selfish and want visitors to read my content 😛

Bringing the webpage out of the Google’s frame has these many advantages.

iframe results on Google image search

How to break out of iframes?

There used to be one wordpress plugin for wp users called Break out of frames, it does not seem to be supported for new versions of wordpress. Here is one simple javascript code which you need to add in the <body> of your webpage. WordPress users may add it in header.php file of the theme after <body> tag.

<script language="JavaScript" type="text/javascript">
if (top.location != self.location) top.location.replace(self.location);

Note: The first point above will not work for Google Translate pages as the url served is still the SE IP address, but frame will be removed.

Also read: Monitor website downtimes, Hide referral links on websites

Thanks Binary Day


Subscribe to RSS Feed or Get updates on your inbox:

People who liked this also read:

4 Readers responded to this post

Thanks for the link buddy. I had forgotten about the post completely. Good that you liked it.

@ binaryday

I have been using that since my theme redesign, recently a friend asked me about that and hence I wrote a post on the same :)

Thanks a ton. THis is more important than ever now that Google images makes it basically impossible for a normal person to bust out of their iframes.

great post ! i was looking for something like this for a while but i couldnt find it ! finally something worked out !
thanks a lot

Leave Your Comments Below / Trackback

About The Author

    Pavan Kumar

    Pavan Kumar completed Engineering in Electronics and Communication in the year 2008. He is very enthusiastic and keen to work on different aspects of computer, internet and mobile related fields. The articles here reflect his creativity. This blog was started as a showcase of solutions for different problems and today it has got a good reputation in the blogosphere. Read More...

© 2015 - All rights reserved.

All content provided in this site are the property of and is free for non-commercial usage. Read our Privacy Policy here.

Any kind content on this site cannot be reproduced in any form without permission of the author. We are not responsible for any loss or damage which may occur due to any of our content.

Site hosted on Bluehost powerful servers.