To grossly oversimplify my webapp:
I am using PHP to communicate with IMAP, outputting relevant
information as JavaScript. The information is aggregated in an
extremely heavily-scripted status display. This display is PHP
include()d in a larger document, with a link to open it in a new
window.
When opened in a new window, the popup communicates with the original
(now hidden) include()d version, provided that the original window is
still open and relevant.
For reasons of server load (we're talking thousands of emails a day in
most cases), only one should be refreshing the information. Hopefully
they maintain concurrency by the popup taking over the role of
refreshing the information, then propagating it to the 'plugin'.
Now... here's my problem:
What I'm trying to do is account for the possibility of someone opening
the popup and closing the main window (or nagivating away from the
site), then independently navigating BACK to the site.
I want to be able to scriptically determine if the popup window is
open, specifically when there is no parent-child relationship between
the popup and the window in which the code is being executed. I may be
able to accomplish this with JS-baked session cookies, but merely
knowing that the window is open isn't -really- what I'm after if I
can't communicate with it.
Ideas?
Can it even be done?
Did I even make sense?