SyntaxFix
Write A Post
Hire A Developer
Questions
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:
history.go(-1)
<script> document.write('<a href="' + document.referrer + '">Go Back</a>'); </script>