Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Oct 2002
    Location
    germany
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to disable back button of the browser?

    hello,

    Can anybody please tell me how to diable the back button or the back button should not work if somebody presses it from the second page or is there any option to create the files from history.

    thank you.

  • #2
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Last edited by fredmv; 12-24-2003 at 06:36 AM.

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post
    A browser's history is stored in an array. I don't know how to read it by array index but history.go(-1) works as a back button. alert(history) is an object and alert(history[0]) is undefined. But I'm pretty sure that this would be a Read-Only array to ensure the security of the user's browser. Personally I don't see any convenient use of this. And I'm sick of porn sites and fake search engines coming in google that use 1 or more page redirections to try to trap you on their page .

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I agree - there is no good or valid reason to disable the backspace key.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    New Coder
    Join Date
    Aug 2003
    Location
    Singapore
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I only know that some of the sites that I went to, they purposely refresh the same page if you press backspace or the back button. That's to 'stuck' the surfers to their site. Don't know if it'll affect their hit counters.

    Other sites when registering, they validate if the user has already been used. They'll alert if it has and tell the user to register under a new name.

    Another way I saw was that the cookie session expires once the form is submitted.

    There are times when I'm just searching for stuff on the web & I won't like to have my Back button disabled when the site is not the relevent site. I like to go back to my search results and try other sites.

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Originally posted by Tails
    But I'm pretty sure that this would be a Read-Only array to ensure the security of the user's browser.
    I'm pretty sure that is how it works. It would be a major security flaw otherwise.
    OracleGuy


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •