[Message Deleted]
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
history.forward();
Vasudevan Deepak Kumar Personal Homepage Tech Gossips