I like using this code when it comes to WordPress blogs. It comes in useful when you would like to add a back button to help the user keep their position on the previous page. But if the user say came from another link, then they will just be returned to the top of the page.