javascript - JQuery - perform task on browser close event -
very simple question. need perform task when user closes browser. i'm aware of functions below:
$(window).bind("beforeunload", function() { return false; }) $(window).unload(function() { return false; })
but both of these - bring alert asking user - "stay on page" - "leave page" (atleast on chrome).
i dont want happen. want perform task when closes updating time on db when left.
any ideas thanks
this impossible done cross browser since opera not support :\ stated here: cross-browser onunload , onbeforeunload ? (particularly opera 11) , in many other documented places.
also others mention there varying degrees of implementation, example firefox can add own message alert box shows on beforeunload in chrome cannot , show generic message of not make sense.
Comments
Post a Comment