to update user activity saying that user is leaving the app, but within the server side, sometimes it works as expected but sometime doesnt, how am i do this?
$(window).on('unload', function() {
$.post('/good-bye').done( data => console.log(data))
console.log('it unload!!');
return "Bye unload!";
});
do a synchronous request
should use socket.io
Assume the user left if no requests in the last X minutes
Обсуждают сегодня