function goBack() { window.history.back(); }
<button onclick="goBack()">Go Back</button>
This code will lead you to the page same as you pressed back in Browser