title: How to check whether child window exists if parent window redirects to some other page
body: <p>On clicking the button a child window is opened: </p>
  
  <pre><code>&lt;button id="btn" onclick="myWindow = window.open('http://www.example.com/index', '', 'toolbars=0,resizable,scrollbars')"&gt;Start&lt;/button&gt;
  </code></pre>
  
  <p>The parent window will redirect to another page on button click.</p>
  
  <pre><code>$('#btn').click(function(){
      parent.location.href = 'http://www.example.com/popup';
  });
  </code></pre>
  
  <p>If I did not redirect the parent window, I am able to check whether the child window exist from the parent window like this:</p>
  
  <pre><code>if(!myWindow.closed){
      alert('Yup, still there.');}
  </code></pre>
  
  <p>Since the parent window is redirecting I am not able to check whether <code>myWindow</code> is closed or not.</p>
  
  <p>How is it possible?</p>