RE: Proposal: Detecting when the user leaves a page due to hitting the back button or typing in a URL or going to a favorite

These pages deserve to be broken :)

-----Original Message-----
From: Boris Zbarsky [mailto:bzbarsky@MIT.EDU] 
Sent: Tuesday, January 06, 2009 12:29 PM
To: Shropshire, Andrew A
Cc: Mike Wilson; public-webapps@w3.org
Subject: Re: Proposal: Detecting when the user leaves a page due to
hitting the back button or typing in a URL or going to a favorite

Shropshire, Andrew A wrote:
> For those that don't, making the unload event cancellable won't break
> anything (it won't be fired multiple times because the first time it's
> fired is the last for the page because it gets unloaded on the first
> fire since these existing web apps don't know that it can be cancelled
> and thus don't do it).

That last part does not follow, though we all wish it did.  There are 
plenty of cases of web apps and web pages doing cargo-cult copy-paste 
programming, with operations that are no-ops happening all over.  If 
they suddenly stop being no-ops, these pages break.  Some research into 
any web browser bug database would pull up a number of examples.

That is, I will bet money there are pages out there that _do_ try to 
cancel the unload event and that would break if it were actually
canceled.

-Boris

Received on Tuesday, 6 January 2009 17:31:53 UTC