I am developing a Ticker support client in PHP with CodeIgniter, and I want to know if a user already open a ticket to hide this ticket from the list.
I know there is the solution of change a flag in database when the ticket is opened, then use :
$(window).unload(function() {
$.ajax({async:false .....
/* change flag in database */
});
But, what if the user's navigator is forcing to close ? Do I need a CRON task running to reset these flags ? Do you have some feedback for a complete solution ? Thanks.