Is your feature request related to a problem? Please describe
If the backend server stopped or died for some reason, the data of the client side can be lost when the user refreshes the browser window.
Describe the solution you'd like
Once the client is not able to reach the backend server or the backend server returns some specific error response, we want the client to show the browser-default popup which asks a user if they want to proceed with closing or refreshing the window. This is possible by capturing beforeunload event and calling preventDefault().
Describe alternatives you've considered
Additional context
Is your feature request related to a problem? Please describe
If the backend server stopped or died for some reason, the data of the client side can be lost when the user refreshes the browser window.
Describe the solution you'd like
Once the client is not able to reach the backend server or the backend server returns some specific error response, we want the client to show the browser-default popup which asks a user if they want to proceed with closing or refreshing the window. This is possible by capturing beforeunload event and calling
preventDefault().Describe alternatives you've considered
Additional context