Back always
<button onclick="goBack()"> < Back to BlogsTour</button>
<script>
function goBack() {
window.history.back();
}
</script>
Always Back + if there is no History Back to my Url (blogstour.com)
<button onclick="goBack()"> < Back to BlogsTour</button>
<script>
function goBack() {
// Check if there's a history to go back to
if (window.history.length > 1) {
// If there is, go back in history
window.history.back();
} else {
// If there's no history, redirect to the specified link
window.location.href = 'https://blogstour.com';
}
}
</script>

