I've been using a back button for users to navigate back to the page they came from, problem is, if the user navigates there in a new tab or direct link, as they haven't "been anywhere" before they would get redirected back to a blank page.
Is there a solution for this? I'm thinking something like navigate back if possible, and if not it'll take you to a specific url.
This is what I have so far:
<a href="#" onclick="history.go(-1);return false;">Go back</a>