Click the following link to navigate to #foo on this page. Then click the second link, which has an empty href and should take you back to the original URL without the #foo.
Click here to go to #foo
Click here to return to the original page with the original url