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

On Sat, 2011-04-16 at 11:12 -0400, Biju wrote:

> Hi,
> 
>    setInterval(function(){location='#'+(1*new Date())},0)
> 
> At least in Firefox 4 above code make entire history filled with
> current url with different hash.
> And hence already now a website can make Backward/Forward button useless.
> 
> ---------------
> 
> When I am on a web application, my naturally tendency to hit back
> button to go back to the previous screen layout. But many times this
> screw up an Ajax application as it may totally navigate away from the
> application page.
> 
> So I want to suggest we should add onBackward and onForward events for
> a page which will be triggered when user click the Backward  or
> Forward button. This will be triggered before onpagehide and event
> handler will be able to cancel the event if needed.
> Additionally there should be also a felicity to enable/disable Forward
> and Backward buttons.
> Also a way for website to know whether currently the Forward and
> Backward buttons are visible, as the page may have opened without the
> browser chrome toolbars.
> 
> Cheers
> Biu


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? Wouldn't onbeforeunload() work in this case
anyway?

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk

Received on Saturday, 16 April 2011 08:14:07 UTC