Go back to where you came from <button onclick="goBack()">Go Back</button> <script> function goBack() { window.history.back(); } </script>