On my website, I would like to disable the browser's back button and key so that a user cannot go back to the previous page.
I was taking an online exam in which a message box was displayed when the BACK button was clicked. I don't know if the coding is done in some other language but the message box popped up very quickly as soon I pressed the BACK button.
Additionally, I would like to disable the F5 key to prevent a user from refreshing their browser, perhaps they can be both done in a similar manner using JavaScript?
add a comment