Let's say you have a user who's logged into his account on a website and has opened multiple pages using lots of tabs.
He then logs out in one of those tabs and continues doing other stuff but then decides to return to the website.
Now, he may have forgotten he logged out and clicked on something in one of the remaining opened tabs but whatever he's clicked requires him to have been logged in to see it - this means the PHP page will display an error message.
Now my question is: How does one make a browser notice a user has logged out across multiple tabs. Sort of like how Facebook does it - if you have multiple tabs open and you log out using one and then open another it will show you a pop up box telling you to log in.
How is this done?
Because, obviously, in the case of such a thing happening, I wouldn't want a user seeing an error in my page.