Very simple question. I need to perform a task when the user closes his browser. I'm aware of the functions below:
$(window).bind("beforeunload", function() { return false; }) $(window).unload(function() { return false; })
But both of these - bring up an alert asking the user - "Stay on this page" - "Leave this page" (atleast on Chrome).
I dont want that to happen. I just want to perform a task when he closes it like updating the time on the DB as to when he left.
Any ideas Thanks