As you seen, while we have 5 open tabs in facebook, once we “Log Out” in one of them and then we go to another tab, it detects that we’re logged out and inform us about it and redirect the user to the login page. how this is working? I want to make such thing for my web app with PHP/jQuery. I just need a hint…
Thanks in advance
Facebook uses Comet technology on their pages. Every page holds an open HTTP request. As soon as something changes (e.g. “incoming chat message” or in your case “user logged out”, this information will be pushed to the clients.
If you’re using NGINX as your webserver, I’d suggest to have a look at the nginx_http_push_module