I’m No Longer Being Framed!
July 3, 2009 at 4:45 pm | Social Networking | Comments |
As I mentioned in an earlier post, these browser bars that sit atop pages that you click to from social networking sites drive me crazy. I can’t do anything about the pages that I’m going to, but I am doing something about the pages that I create.
There is a small piece of javascript code that I’ve now placed at the top of this page which detects whether my page is being loaded in a frameset and busts out of it if it is. This code is below.
<script type=’text/javascript’>
if (window!= top)
top.location.href=location.href
</script>
I was in the habit of adding this code to every site I built for years, but got out of the habit because frames went away. Now I think I’ll remember to do so from now on.











