Hi All, I am looking to encoporate a 'Who Wants to be a Millionaire' style quiz into a website for a client and need advice on how to stop users being able to use the 'page back' button on their browswers. Is there a piece of HTML code I can drop in that will stop them being able to do this? Also is there anyway to stop users 'bookmarking' pages? Advice would be great. W
The easiest way would be to use javascript to open a new page, this way you can set the page to not have an address bar so the only thing the user can do is click the X and return to your website instead of navigating away. Just search Google for JavaScript Popup Generator, it has the options to remove certain things from the window. As for the bookmarking, I'm not too sure on how to do this.
You could also do this all server-side, where the server determines if and when a new page is served. People should be able to go back and look at things their browser has cached, but you can tell browsers not to cache those pages (no-cache and no-store HTTP headers). Add a session to the url. After the session expires, the url with the session no longer exists, and you can have anyone trying to access that URL be brought to the main page or a log in screen or whatever. Like what the bank does.
HI If you have knowledge about java script and my suggestions you use it. If you did not have knowledge about java script. You can learn w3school.com