- From: Bil Corry <bil@corry.biz>
- Date: Fri, 12 Dec 2008 13:17:39 -0600
Ojan Vafai wrote on 12/12/2008 12:49 PM: > If we're going for matching what browsers do, there's a number of cases > (different in each browser) where the confirm doesn't popup. In Chrome, for > example, if the beforeunload handler takes too long, we kill it and navigate > away. Similarly, in Firefox, if the beforeunload handler hits the limit for > script execution and the user stops the script, the beforeunload handler > never fires. > > Not sure what the right language for that is. But developers try to do > things like using beforeunload/unload to release locks, make server > requests, etc. and it's just not a very reliable thing to do in any browser. > It's really just useful for the quick prompt for the user as to things like > unsaved changes. Here's a fun one, I made this as a demo to show how a website could trap a user forever: http://www.corry.biz/neverleave.lasso I haven't tried it in any browsers lately, but a quick test with IE7 shows it still is effective (for it at least). - Bil
Received on Friday, 12 December 2008 11:17:39 UTC