Break Out of a Frame on Page Load

11.22.2005 | 11:12 am | HTML, Site Building

Does someone link to your site from inside a frame and now your site ends up inside of their page’s frame? Do you get a lot of referrals from search engine image searches and get stuck in their frame too? Me too, I have a little of both actually and I wanted a way for my site’s pages to load in their own frame automatically or “break out of the frame” while the page initially loads for the visitor without them doing anything themselves. Thankfully, I found that this is quite simple to do all you need to do is add the below code to your BODY tag.

Code to add
onLoad="if (self != top) top.location = self.location"

Place code in your body tag. Like this:
body onLoad="if (self != top) top.location = self.location"

No Comments »

No comments yet.

 

Leave a comment

   

  • Setting Google AdSense Alternate Ad URL
  • Beginners Increase your Adsense Income
  • 5 Tips to improve your Google ranking
  • Using Chitika eMiniMalls With Adsense
  • Chitika eMiniMall Sign up Process
  • Introducing Google Analytics
  • Google AdSense Rewards Content
  • How to Run Google Adsense and Chitika eMiniMalls on the same page