javascript - Tell browser close apart from navigating away in onunload -


As a fontand explanatory routine, our web app stays certain states on the server when the browser is closed. However, when navigating away from the app we do not want to call the exit, because later the app can be navigated back. With the outgoing routine perspective, there are two different scenarios for navigating the browser and navigating.

One way to write data to the server on the frontend is the downward event handler. However, we are having problems in separating the browser and navigating away. The downloaded handler is said in both cases. We need to tell us whether we are going away in the Inogly so that we do not call for the exit.

Any thoughts? Thanks!

From the perspective of the exit routine, there are two different scenarios to close and navigate the browser < / P>

It seems that you can resolve this by keeping track of user status in a session cookie - a cookie that ends with no , , or Maximum-way attributes

In this way, the session state will continue when users go away from the app / page, but Raujhr will be reset when turned off.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -