Results 1 to 4 of 4

Thread: How do I disable the browser's back button?

  1. #1
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default How do I disable the browser's back button?

    I have a web page set up for a couple of thousand internal users. I have password protected the management page but, if you navigate away and click back it takes you directly to the page instead of the password page. Is there anyway of disabling the back button on that page?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Not in HTML or any of the other languages generally covered in this form. I imagine you would need to make your own proprietary version of a particular browser or browsers and require all of your user to use it. Any generic browser has a back button and it cannot be disabled using client or server side code. You could probably track where your users have been on the server side and redirect them if they return a second time, but that would probably apply regardless of how they got there the second time, no way to tell if it was via the back button or not. But to actually disable the button, not with out creating a browser that has none.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    In some browsers you could accomplish what you want by using a popup(where it is possible to disable certain parts of the browser UI). For this to have a chance of working you need to be able to dictate to your users exactly what browser and version they use so as to make sure it works. However, with that said, I would be more apt to change the server side code so that it doesn't allow someone to access the page without going through the password page.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Even with that Brady, the user can do a ctrl-n or equivalent to get a new browser window and then do as he or she sees fit.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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