Results 1 to 2 of 2

Thread: How can I disable back and forward in browser?

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

    Default How can I disable back and forward in browser?

    I'm writing a simulation that will load different screens depending on an action taken by a student. I need a piece of code to disable the browser back and forward commands to maintain the integrity of the process flow. I'm not concerned about them turning off Javascript or anything, so don't worrry about it being defeated. I just want to keep navigation inside the browser based on user input, i.e. buttons that are hyperlinked to the subsequent page.
    Thanks all.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Check the Referer: HTTP header. If it's not satisfactory, redirect them back to the page.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •