Disable IE back button
I would like to disable the back button in IE7 and IE8.
I assume the best way is to use window.open. I tried below and it disabled the IE back button but doesnt show the menu items, url bar etc.
<a href="#" onClick="window.open(theURL, 'newpage.html', 'fullscreen=yes, scrollbars=auto')">go to page with disabled IE back button</a>;
Why would you do that?! A system that requires the back button to be disabled is a broken one.
You see how you have fullscreen=yes? Well, these are other options you can have there, including showing the menu items and url.
And yes, please do tell why the hell do you need that
i love easter eggs
(if you got any creative easter eggs, send me a PM)
I have seen a hell of a lot of posts, here and in other places, asking
about 'disabling' the back button on the user's browser.
Sometimes, this is related to preventing duplicate form submissions;
often, it is related to preventing casual passers-by from peeking at
possibly confidential information displayed on a previous screen, etc
There are definitive answers to this:
1. Possible duplicate submission issues HAVE to be handled server-side.
There is simply no alternative.
2. Any scripted wiping of data from a form or table prior to unload can be
to expose this security hole him/herself begs question !)
3. Revisits to pages associated with LOGIN and LOGOUT can, and must, be
dealt with by suitable server-side logic and prudent session management.
If a user is supposed to be logged OUT, the he/she cannot be permitted to
enter a process, mid-job, by sending a previous page in the browser history.
If the user is still logged IN, the issue of their duplicating a task which they
have already completed is, once again, a matter for session control logic.
These things are usually only a matter of a series of YES/NO boolean flags
in data files on the server, and should not be causing migraines to any
web developer, IMHO.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)