Measuring programming progress by lines of code is like measuring aircraft building progress by weight. --Bill Gates

How Do I Keep My Website From Being Viewed In a Frame?

Using Javascript to escape frames


Certain websites, such as search engines or email providers, will forward to new web pages inside a frame so they can continue to show their own banner at the top of the page. This, in my humble opinion, is bad form--similar to popups.

You can actually force a browser to load your page and drop the frame using a little bit of javascript. Once again, I don't recommend this because it's generally a bad idea to mess with a person's browser (maybe they like the frame), but I have had occassion to use it when the frames caused problems for web page.

Example: How to escape a frame and load your page in the browser

      <SCRIPT language="javascript">
         if (top != self) 
            top.location = location;
      Test page.