How to make an HTML back link?
This solution has the benefit of showing the URL of the linked-to page on hover, as most browsers do by default, instead of history.go(-1)
or similar:
<script>
document.write('<a href="' + document.referrer + '">Go Back</a>');
</script>
And another way:
<a href="javascript:history.back()">Go Back</a>