W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

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

From: Shropshire, Andrew A <shropshire@att.com>
Date: Tue, 6 Jan 2009 12:35:30 -0500
Message-ID: <24D5F2204CBFC84499520C14CC11036C0823ABCA@vna-exch1.gsi.grci.com>
To: "Mike Wilson" <mikewse@hotmail.com>, "Boris Zbarsky" <bzbarsky@MIT.EDU>
Cc: <public-webapps@w3.org>

We need to standardize the standardization process...  Never heard of
WHATWG.  I note that Microsoft isn't a participant.  What page is it on?


-----Original Message-----
From: Mike Wilson [mailto:mikewse@hotmail.com] 
Sent: Tuesday, January 06, 2009 11:48 AM
To: Shropshire, Andrew A; 'Boris Zbarsky'
Cc: 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:
> 1. Allow the unload event to be cancelled.  This could be 
> done in a way consistent with other cancellable events 

I'll reiterate what Boris has said, and I think most will
agree:

There is already an event for cancelling "leaving the page"
and that is the beforeunload event. It is widely available
and is also being standardized in HTML5:
http://www.whatwg.org/specs/web-apps/current-work/

The current event setup is quite orthogonal and nice in my 
view; you use beforeunload to know when the user is
asking to leave the page (with the option to cancel) and
the unload event to know when the user has decided to
really leave the page.

Making the unload event cancellable would be like making
the load event cancellable - wouldn't make sense.

Best regards
Mike Wilson
Received on Tuesday, 6 January 2009 17:36:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:29 GMT