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

Biju bijumaillist at gmail.com
Sat Apr 16 08:12:12 PDT 2011


   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.


More information about the whatwg mailing list