location.replace()
replace() method accepts a single argument, the URL to navigate to, but does not make an entry in the history stack. After calling replace(), the user cannot go back to the previous page.
<!DOCTYPE html>
<html>
<head>
<title>You won't be able to get back here</title>
</head>
<body>
<script type="text/javascript">
setTimeout(function () {
location.replace("http://www.java2s.com/");
}, 1000);
</script>
</body>
</html>