how to redirect when user closes window or tab
<p>Is there a way to redirect the window or tab when a user closes it?  This does not work (in jQuery):</p>

<pre><code>$(window).bind('beforeunload', function() {
   window.location = 'anotherpage.html'
}
</code></pre>

<p>Is it even possible?  I just want to redirect a user to another page when they close it.</p>
