title: closing child window while the reference is lost [without opening a false popup]
body: <p>Well! there are so many posts on this topic but couldn't find the one which answers my question.</p>
  
  <p><b>Topic Javascript.</b><br> The question:</p>
  
  <p>My application opens 3-4 popups using window.open API. It depends on the user whether he keeps them open or closed. User can refresh the parent page which will ultimately lose all the references of children.</p>
  
  <p>Now assume parent is refreshed.
  While logging out I want to close all the open popups.
  Open popups can be easily closed, and I was able to figure that out using </p>
  
  <pre><code>win = window.open("", CHILD_WINDOW_NAME);
  win.close();
  </code></pre>
  
  <p>Now if the popups are not open and I'm trying to close them using above code. It opens a false popup for a second and then closes it, which I don't want. This gives a bad feel of flashing popups.</p>
  
  <p>How could I achieve it? </p>
  
  <p>Reference: <a href="http://josephj.com/lab/2011/window-open-reconnect/demo.html" rel="nofollow">http://josephj.com/lab/2011/window-open-reconnect/demo.html</a></p>