I\'m trying to post data when a user leaves my page. I have finally managed to find a working solution, however, it shows a confirmation dialog when the user leaves. I have
If you want to disable the dialog, please only write
window.onbeforeunload = function() { ... return; }
instead of
window.onbeforeunload = function() { ... return ''; }.
window.onbeforeunload = function() { ... return ''; }
I hope it will help you.