title: window.opener issue with window.open() when replacing a window
body: <p>I have a web application where page #1 opens a popup window using</p>
  
  <pre><code>window.open(myUrl, "fixedApplicationTargetId", "");
  </code></pre>
  
  <p>Then page #2 overwrites the same popup window with a call to window.open using <strong>the same target</strong> value</p>
  
  <pre><code>window.open(anotherUrl, "fixedApplicationTargetId", "");
  </code></pre>
  
  <p>At this point the content of the popup originally created by page #1 shows the new content created by page #2. So far so good with any browser.</p>
  
  <p>Then the popup itself detects who last opened the popup and updated the content using window.opener. Prior to calling window.open both page #1 and page #2 create a global variable globalPageId and assign a unique number each. The popup checks the value of window.opener.globalPageId and detects which window last updated the popup content.</p>
  
  <p>This is where things fall apart: the above works fine with chrome and firefox that update window.opener in the popup each time the content is updated with window.open. Instead, IE and opera always point the popup window.opener to the first window that used window.open.</p>
  
  <p><strong>Any suggestion, in a context where multiple pages call window.open on the same target, how to detect from the popup itself which window last opened the window?</strong></p>