Forum Moderators: open

Message Too Old, No Replies

disable back button of browser

         

manjumurthy

4:49 am on Sep 20, 2001 (gmt 0)



Hi all,
I have a common problem, Can anyone tell me how to disable the back button of browser only for certain pages.
Thanx
manjumurthy

tedster

5:54 am on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My guess is that you cannot truly disable the Back Button because of security problems that would create. But, for just certain selected pages, you can achieve a similar effect:

Make your links go not to the page itself but to an "in between" page that then redirects the user to the actual destination URL. With that set-up, a single click on the Back Button will loop the user right back to the page they were already on. The screen will redraw (quickly) rather than just staying static.

Marshall

6:11 am on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



tedster,

Don't you think that would be rather rude?

(edited by: Marshall at 6:42 am (gmt) on Sep. 20, 2001

littleman

6:21 am on Sep 20, 2001 (gmt 0)



If you want to learn all those devious tricks go to an adult webmaster resource site, they are masters at javascript games.

tedster

6:48 am on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> Don't you think that would be rather rude?

In almost all cases, absolutely. I was assuming that manju has a unique reason for this request, such as working on a special, limited audience project with unique requirements. Most of his posts seem to be in this direction.

On my public sites, I go to extremes to make sure that the Back Button always works intuitively.

engine

6:09 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Simply, pop up a new window that removes the toolbar or menubar, as required.
Just make sure you include a "close window" option.

Macguru

6:17 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Personally,

I run away from any site disabeling any browser feature. Confidence level is the opposite way.

tedster

6:20 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Engine, that's elegant and, now that you've said it, it's so obvious (smack on the head!)

Liane

6:38 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with Macguru. I have a blacklist of sites that I keep beside my computer to remind myself never to go back again. As soon as I find myself *trapped* on a site, I close the application, restart and add the site address to my list of "Don't go there again" sites. Its not only rude, it is such a major source of annoyance to most users that it has the exact opposite effect than what is desired by those who have the nerve to disable my browser and try to hog tie me to their site!

(edited by: Liane at 6:44 pm (gmt) on Sep. 20, 2001

mivox

6:38 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The only times I ever disable the browser toolbar or anything else is in pop-up windows... and I very rarely use pop-up windows in the first place.

Mike_Mackin

7:04 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>major source of annoyance to most users

It is for that reason that adwords will not approve an ad linked to a site that disables the back button of a browser

fyi

john316

7:43 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Disabling the back button is similar to disabling the brakes on a car, it makes the user feel very uncomfortable. I never return to sites that pull that stunt.

The exception is pop up windows, they are clearly extracurricular thingamajiggies that aren't part of the logical surfing sequence.

Beagle

8:09 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi manjumurthy:

its been a while since i tinkered with this but i believe you can do it two ways. try looking at these two JS methods

history.go() and/or
location.replace()

i think go() will take an argument of -1 which makes the current page appear as the first one the browser has been too. something like that. there is no actual way to switch on or off the functionality in the browser unless (as stated above) you launch a new window without a toolbar...and even then it is still there if the user presses alt+left sorry i could not be a tad more precise.

sophie

2:10 pm on Oct 26, 2001 (gmt 0)

10+ Year Member



thanks for your discussion. i am working on sth similiar. it helps me to make a decision.

however, most js on client-side seem only compatible with IE5&above and NS4.7&above.

my current focus is ASP with session, which helps it compatible with all browsers.

qwert

5:19 am on Apr 1, 2002 (gmt 0)

10+ Year Member



how about disable the refresh button of browser... any suggestions??

prabhunkl

2:51 pm on Apr 11, 2002 (gmt 0)

10+ Year Member



Use onback=history.forward(); to over come the back button function. It will work for IE5.5 and IE6.

I hope there is a no solution to disable the Refresh button/Function.

iceman

12:48 pm on Apr 15, 2002 (gmt 0)

10+ Year Member



would you use some form of "onback=history.forward();" to detect when the back button has been activated?

khamishm

10:50 am on May 31, 2002 (gmt 0)



This may be of a great help ...Just check out and it works fine in Netscape

<script language="JavaScript"><!--
javascript:window.history.forward(1);
//--></script>

gsx

10:57 am on Jun 4, 2002 (gmt 0)

10+ Year Member



There are a few reasons that he may wish to disable the back button.

For example, some sites can charge your credit card twice if you use the back button to exit.

The best way to disable is to use a between page with a javascript forwarding and a meta refresh tag.

You cannot fully disable the back button because more advanced surfers can and will use the right button on the back button and jump back several pages. More modern browsers all seem to have the down arrow to see a list of the history.