Disable browser forward/back buttons?

Discussion in 'Web Design and Development' started by londonweb, Jun 12, 2006.

  1. londonweb macrumors 6502


    Sep 14, 2005
    I think this is a javascript question; does anyone have a script to disable the forward and back buttons in the browser?

    I normally avoid building flash pages that are all contained within one html page, because it drives people nuts when they click 'back' and end up accidentally exiting the page and having to reload the movie again. But this time it's unavoidable.
  2. c-Row macrumors 65816


    Jan 10, 2006
    You can't really 'disable' them, but you can use workarounds to achieve something similar.

    I don't remember what the function was, but you can redirect the browser to another page - like, after clicking on a link - via JS without the new page being added to the browser's history. Of course, the user can still go "back" to where he was before he entered your website.

    Alternatively, you might want to look into AJAX and update the page dynamically.
  3. Moria macrumors regular

    May 7, 2005
    Glasgow, Scotland
    I don't think any browser other than IE will let you disable them. Wouldn't you get really annoyed if you wanted to press the back button to go back to a search engine or previous site but had to close your browser to do so?

Share This Page