10.2 Keeping a Page Out of the Browser History
NN 3, IE 4
The capability of keeping a page out of the browser's history can come in handy when your site contains a page that include automatic forwarding under script control. Recipe 5.10 is a typical situation that benefits from keeping a temporary page out of the history. If the user reaches the real home page, a press of the browser's Back button normally brings the user back to the temporary page, and the user is essentially trapped in an infinite loop from which escape can only occur by going forward.
You can also use this technique if you do not want a user to come back to a form after submitting it. But in this case, you must assemble the form data yourself, appending it to the URL string passed with the replace( ) method. The page returned from your CGI program replaces the form page in the browser history. Be aware, however, that this works only for form submissions that can be accomplished with the GET method, rather than the POST method. Invoking the location.replace( ) method causes the browser to request a page through a GET method just like a regular web page.
10.2.4 See Also