note 32738 deleted from function.header by kennyt
| From: | kennyt@php.net | Date: | Sun, 18 Jul 2004 18:08:45 +0000 |
| Subject: | note 32738 deleted from function.header by kennyt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73564@lists.php.net to get a copy of this message | ||
Note Submitter: sahasrahla@hotmail.com
----
RE: james at SORRYNOSPAM dot com @ 17-Apr-2003 03:00
About the Javascript redirect... If you have a page that should NEVER be in any framesets, you can
add this code to it:
<script type="text/javascript">
if (self != top){
if (document.images) top.location.replace(document.location.href);
else top.location.href = document.location.href;
}
</script>
That way it doesn't matter where the page gets linked from, it will always bounce to the _top
level of the browser window.
I use this on my site to escape FrameSets that get imposed by other sites. Most notably, this will
escape the banner put at the top when a user of Hotmail clicks a link to your site from an e-mail.