Forum Moderators: phranque

Message Too Old, No Replies

Dissable 'Back' and 'Forward'...?

Can you dissable a browsers navigation?

         

YorkshireSteve

3:31 pm on Nov 9, 2003 (gmt 0)

10+ Year Member



Hi,

Is it possible to dissable the user's back and forward navigation when browsing a page (Similar to dissabling the right-click). The reason I ask is that I'm developing a secure web application, and I want the user to be bound by my navigation. I know this would be a nasty thing to do, but it's neccessary to maintain security.

Steve.

divaone

7:27 pm on Nov 9, 2003 (gmt 0)

10+ Year Member



I know this would be a nasty thing to do, but it's neccessary to maintain security.

yep, nasty thing to do :o) but i think you stating that will save a debate, lol.

1) you can set the page you don't want users going back to no cache and expire immediately:

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">

2) you can use javascript to redirect from page 2 to page 3 immediately. when a user tries to go back they will again be redirected immediately.

i'd test the options out thoroughly before release. btw, the browser's back button can't really be manually 'broken' and to alter forward, if it were possible, would be redundant.

hth

choster

7:37 pm on Nov 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can understand the purpose. If you do go through with disabling the back button, I suggest also using a popup window for two reasons: 1) user won't try to manipulate the url in the location bar; 2) such a registration process is not like browsing the web, it is like a separate application, so please don't screw up the history in my main browser window to run it :-).

YorkshireSteve

6:50 pm on Nov 10, 2003 (gmt 0)

10+ Year Member



Thanks for the replies.

The new window idea's great, until someone does CTRL + N in IE, or uses their back button on a fancy mouse or keyboard? Hmmmmm..... I'll have to think this over a little while longer. :o)

Thanks,

Steve.