I hesitated explaining how they do that, for fear that other sites might begin doing it also, but then decided that the more people know about how something happens, the more likely they will be able to handle it when it does happen.
http://www.tcs.org/browsertest/test1.htm is an example of a web page that will not die (easily). Here is the html code that makes up that page:
<html>
<head>
<title>Test1</title>
<script language="Javascript">
<!--
flag = 1;
function go() {
if (flag) {open("http://www.tcs.org/browsertest/test3.htm", "_blank");}
}
// -->
</script>
<body link=black vlink=black onUnload="go()" bgcolor=white>
<center><h1>Test1</h1></center>
<a href="http://www.tcs.org/browsertest/test2.htm">Don't Click</a>
</body>
</html>
If you close the browser window displaying test1.htm, the "onUnload="go()"" will cause function go to be executed, which will open a new browser with page test3.htm. If you close that one, it will open a new one with test5.htm, then test7.htm, and finally back to test1.htm.
The only way to get it to close is to click the close box (the "X") on the new window before the browser actually finishes loading the new page, which is NOT easy to do.
And for something even more insidious, if you happen to click on the link that says "Don't Click" (i.e. if one of the pages has something which tempts you even a little), then not only will it dispatch the next page in the series, it will also start a new series, so you will have two browsers that won't (easily) die, one that cycles through 1, 3, 5, 7, and back to 1, and another that cycles through 2, 4, 6, 8, and back to 2.
I created these eight pages so that at a future internet meeting I can show our members how to try to deal with these browsers that won't die, without having to expose them to adult oriented pages which might offend some in the audience.
I do NOT want to be responsible for people using this technique on their own web pages, and I will say right now, that the Tulsa Computer Society web site will NOT link to anyone's pages that use this technique, and I hope that someone can come up with a way where a browser page can be closed, without allowing it to execute any more Javascript code.
For more information on the Tulsa Computer Society click here