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.
- 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 http://images.google.com/…… and if the adsense get any clicks, it wont be counted.
- 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.
- 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.
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);
</script>
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
People who liked this also read:
Thanks for the link buddy. I had forgotten about the post completely. Good that you liked it.