W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] onForward and onBackward event and enable/disable Forward and Backward buttons.

From: Biju <bijumaillist@gmail.com>
Date: Sat, 16 Apr 2011 14:02:18 -0400
Message-ID: <BANLkTikXzXygnh2PSaSe55fNOdCix_iJTw@mail.gmail.com>
On Sat, Apr 16, 2011 at 11:14 AM, Ashley Sheridan
<ash at ashleysheridan.co.uk> wrote:
> Couldn't that be badly abused by sites that wanted you to force you to use their navigation
> rather than allow you to use back and forwards buttons on your browser?
This proposal wont give any more facility to website than they already have now.
To reduce abuse, we could make it not trigger onBackward and onForward
events if user pulled the history list and selected one from the list.
ie, onBackward and onForward events should only trigger if user
directly hit  Backward and Forward buttons to move +1 or -1 position
in the history list. Additionally history.go() called from javascript
also should not trigger onBackward and onForward events.

> Wouldn't  onbeforeunload() work in this case anyway?
That will do a modal prompt, that need another user action, which is
not good. Then the page also dont know how  onbeforeunload() got
triggered, ie by tab/window close,  Backward/Forward button click,
clicking links, etc (we only care about Backward/Forward button click
in this case). Also webpage wont be able to navigate to any other page
or do a Ajax page change that STAYS and visible to user in
onbeforeunload() event.
Received on Saturday, 16 April 2011 11:02:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT