This 'bounce-out' is accomplished via the following code:
<script language="javascript" type="text/javascript"> /* ====================================================== * ' Super-Break-Out '* ====================================================== * ' Written By : Shawn K. Hall [Reliable Answers.com] ' Inputs : sMyDom = Domain to force url back to ' : * CHANGE sMyDom!!! ' : * MUST Be lowercase ' : * break it into several words ' : to limit proxy alteration ' Description : This forces the current document to the ' : top of any *remote* frames (it allows ' : framing from YOUR server) AND forces ' : the client domain to be that depicted ' : in sMyDom. ' Usage Sample : Just include this code. It will ' : automatically run every time. '* ====================================================== */ var sMyDom = 'reliable'+'answers'+'.com'; if (top.document.domain != sMyDom) { top.location.replace(document.URL.replace(document.domain, sMyDom)); } </script>
It has the added benefit of persisting the current path of the active page, so if it's being raised from a sub-page of the site it will be redirected to the corresponding page on your site.
Three VERY important notes:
And though this wasn't intended, it looks like it should work as an alternative to the common 'get-out-of-frames' script, while allowing pages/framesets on your own domain to frame your own pages. Pretty nifty. :)
Here's a couple links to test it out, the 'end-page' should always be https://reliableanswers.com/js/sb-out.asp
As always, client-side script requires that the client support script in order for it to work at all. Though it is rare these days that a browser will not support script, it may be disabled or limited due to security concerns. As long as scripting is available on the client this script should function correctly without errors.