I'm wondering if anyone knows how exactly Gmail, Hotmail, Facebook etc handles following scenario. (NOTE: Assuming Cookie is shared between tabs)
- Opens two login page to the application.
- User 1 logs in the domain.
- User 1 changes some data without saving it.
- User 2 logs in the domain in a separate tab.
- User 1 switches back to his tab and saves the data.
I tried repeating the steps FF for Gmail, it sometimes gives me "This may have happened automatically because another user signed in from the same browser" and logs the previous user out automatically" but the other times just shows "The page isn't redirecting properly" and I'll have to clear my cookie.
Hotmail, seems to be a bit better, where it immediately detects that I'm logged in the first page and asking if I would like to switch account. If I selected to switch account and goes back to try to save the data, hotmail throws a login error message.
Anyone can shed some light on how each one is implemented as well as what might be the best practice to handle this problem?