So, I ran into some weird problem, and I hope there are some IE developers who can shed light on this behavior. My company works in real time. We use the comet model for real-time exchange between browsers and the server, as is standard for elevators. It is also worth noting: in case the comets do not synchronize with the server (due to connection problems or server reboot, which would kill the session on the server), the server responds to the comet request using document.location.reload();to reload the page, start a new session, etc. .
Now, to ensure that the logout occurs as it should, we have a special url (/ session / logout) that does all the cleaning related to the session and returns you to our home page. This can be caused by clicking on the anchor to this URL, or the server can give you 302 to this URL if you try to do something that requires you to log out. Simple enough, right? In most browsers, this works fine because the workflow looks something like this:
- The user either clicks the exit button or the server sends 302 in / session / logout
- Javascript execution on the current page stops, so all comets are disabled.
- Download / Browser Session / Logout
- The browser received 302 messages from the server (meaning cleaning the session) in order to drive the user to the home page.
- Download the browser to the main page.
However, in IE, we observe the following behavior:
- The user either clicks the exit button or the server sends 302 in / session / logout
- Browser Starts Download / Session / Logout
- The browser received message 302 from the server (meaning that the session cleanup is complete) to launch the user to the home page.
- The browser starts loading the home page.
- Comets are received
document.location.reload();from the server because they never turned off IE, the loading of the home page is interrupted, and the current page is reloaded without user login.
, /session/logout - , , , ( 302, , , ).
- ? , ?