Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved Web Development
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gubba
    wrote on last edited by
    #1

    [Message Deleted]

    S V 2 Replies Last reply
    0
    • G gubba

      [Message Deleted]

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      gubba wrote:

      I am developing a project for an online exam where i want to disable the test takers from going back to the previous page.

      There are ways... but they're not guaranteed. Realistically speaking, it's up to the browser whether you can ever go "back". You can use redirect tricks or JS to encourage a browser to ditch its history... but if this is actually important then you'd better do it server-side: keep track of which pages they've completed, and ignore (silently (or noisily if you prefer)) any attempt to re-submit that section of the test. Now, I'm assuming that you really only care about preventing users from going back to change their answers - if you'd rather they not even be able to view their previous questions/answers, then you should be able to use cache control hints to encourage the browser to discard previous pages - when completed sections are requested, just redirect to the first incomplete section (or, a screaming red "cheater" page, whichever). Of course, there's no guarantee that browsers will respect this, but then, there's nothing preventing users from copying or printing previous pages either...

      ----

      It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.

      --Raymond Chen on MSDN

      G 1 Reply Last reply
      0
      • S Shog9 0

        gubba wrote:

        I am developing a project for an online exam where i want to disable the test takers from going back to the previous page.

        There are ways... but they're not guaranteed. Realistically speaking, it's up to the browser whether you can ever go "back". You can use redirect tricks or JS to encourage a browser to ditch its history... but if this is actually important then you'd better do it server-side: keep track of which pages they've completed, and ignore (silently (or noisily if you prefer)) any attempt to re-submit that section of the test. Now, I'm assuming that you really only care about preventing users from going back to change their answers - if you'd rather they not even be able to view their previous questions/answers, then you should be able to use cache control hints to encourage the browser to discard previous pages - when completed sections are requested, just redirect to the first incomplete section (or, a screaming red "cheater" page, whichever). Of course, there's no guarantee that browsers will respect this, but then, there's nothing preventing users from copying or printing previous pages either...

        ----

        It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.

        --Raymond Chen on MSDN

        G Offline
        G Offline
        gubba
        wrote on last edited by
        #3

        [Message Deleted]

        M 1 Reply Last reply
        0
        • G gubba

          [Message Deleted]

          M Offline
          M Offline
          Mohammad Dabaan
          wrote on last edited by
          #4

          hello while I was searching on code project I found ur good question, i need the solution cause it is good to put it on all of ur done websites, may u please send me the solution that u got in more details cause i didnt undrstand the solution :rose::-D

          Thanks alot Hamody

          G 1 Reply Last reply
          0
          • M Mohammad Dabaan

            hello while I was searching on code project I found ur good question, i need the solution cause it is good to put it on all of ur done websites, may u please send me the solution that u got in more details cause i didnt undrstand the solution :rose::-D

            Thanks alot Hamody

            G Offline
            G Offline
            gubba
            wrote on last edited by
            #5

            [Message Deleted]

            M 1 Reply Last reply
            0
            • G gubba

              [Message Deleted]

              M Offline
              M Offline
              Mohammad Dabaan
              wrote on last edited by
              #6

              hi, morning, i made a small website with 2 web forms, i put the script code u sent me on the top of the web form 1 but it disabled the back to the whole of the web site, i want it to disable the back on specific web form, so how it will be??? :-O

              Thanks alot Hamody

              G 1 Reply Last reply
              0
              • M Mohammad Dabaan

                hi, morning, i made a small website with 2 web forms, i put the script code u sent me on the top of the web form 1 but it disabled the back to the whole of the web site, i want it to disable the back on specific web form, so how it will be??? :-O

                Thanks alot Hamody

                G Offline
                G Offline
                gubba
                wrote on last edited by
                #7

                [Message Deleted]

                S 1 Reply Last reply
                0
                • G gubba

                  [Message Deleted]

                  S Offline
                  S Offline
                  Shog9 0
                  wrote on last edited by
                  #8

                  gubba wrote:

                  This method is working fine for me.

                  Be aware, all i need to do to break this is to disable Javascript...

                  ----

                  It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.

                  --Raymond Chen on MSDN

                  1 Reply Last reply
                  0
                  • G gubba

                    [Message Deleted]

                    V Offline
                    V Offline
                    Vasudevan Deepak Kumar
                    wrote on last edited by
                    #9

                    history.forward();

                    Vasudevan Deepak Kumar Personal Homepage Tech Gossips

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups