Avoiding Frames

[Total: 0    Average: 0/5]

How to break out of frames if someone has trapped your site in their frameset.

Body Code:

<TABLE BORDER=0 WIDTH=486><TR><TD ALIGN=CENTER>Clearing Frames from Your Browser</B></TD></TR>
<P><B>Why You Might Want to Clear Frames</B>
<P>Not everyone on the net shares your moral absolutes. Sad, but true. And even with Netscape's&reg; careful attention to security issues surrounding JavaScript, some folks might well frame you... that is enclose your site within their frameset.
<P><B>So How to Clear the Frames?</B>
<P>It's really pretty simple. First, you can add the TARGET="_top" specification to your own links in your own pages. <B>If you are worried about being enclosed in someone else's frameset, you should add the TARGET="_top" property to all the links in your web site.</B>
<P>If you want to provide an easy mechanism for your visitors to break out of any frames if they want, then you can just include the following HTML:
<P><code>&lt;a href="#" target="_top"&gt;Click here to break from frames&lt;/a&gt;</code>
<P>Or if you want to include some JavaScript code that does the same thing, add the following script to your pages:
<P><code>&lt;script language="JavaScript"&gt;<br>
if (top.location.href != location.href)<br>
&nbsp;top.location.href = location.href;<br>
// --&gt;<br>
<P>But if you are just surfing about, you need to monitor your location bar. We always set the preferences in our browser so that the URL of the current page is shown at the top of the browser window. Then you can make sure that it changes as you surf. If you notice that you have followed several links but it has not changed, that means that you are FRAMED (unless of course you are intentionally within a site's frameset). To fix this problem, next time you go to click on a link, copy the link location and paste it into the location bar of your browser so that it loads without being inside any frameset. You copy the link location by right clicking on the link (click and hold on a Mac) and then selecting "Copy link location".<br>
<hr noshade width=486>

Times Viewed: 5

Leave a Reply

Your email address will not be published. Required fields are marked *