AJAX - The Complete Reference

(avery) #1

PART II


Chapter 9: Site and Application Architecture with Ajax 453


To mitigate the broken back button problem, a number of approaches can be taken.
First, you can attempt to disable the feature somehow. This is actually not terribly feasible.
To accomplish this, the right-click menu needs to be disabled or the functionality replaced.
A simple piece of code like:

window.oncontextmenu = function(){return false;};

would do the trick for the whole page. However, there is more on this menu than just back
functionality:

The user may want to use some other features on the menu like saving an image. In that
case, we could avoid killing the menu but instead put up a menu with the functions
deemed appropriate for the user to perform:

Of course, note that we decided what is appropriate here, and the user might be
annoyed by the loss of control.
Even if the context menu were removed or modified, the next step would be to deal
with the keystroke-aware user who knows the combinations of keys necessary to move
Free download pdf