Answer the question
In order to leave comments, you need to log in
Closing tab/browser or save our docks?
There is a web interface with which you have to work with data for a long time. Data is saved by clicking. Autosave doesn't work for certain reasons. How, when closing the browser / tab, to display a message that they say “Have you saved the data on this page?”.
I remember that in the old JS textbooks there were a lot of such examples. On the forums they wrote that it was not necessary to do this (at least on ordinary sites). But now I can’t find an example of how to implement this.
Answer the question
In order to leave comments, you need to log in
For the opera, try it, I don’t remember what exactly, but somehow I struggled.
And then I just needed to send an event that the tab was closed, but most likely you can’t stop it.
if(window.opera){
document.body.addEventListener('_close', ajaxUnload(), false);
history.navigationMode = 'compatible';
window.onunload =ajaxUnload;
}
Opera does not support this type of event. Closing a tab or browser is not tracked in Opera.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question