I have a page that uses a <a href="#portafolio">
to scroll to a specific anchor like this <a name="portafolio"> </a>
.
When I click on a link <a href="#portafolio">
an address like this is createdhttp://myportafolio.com/#portafolio
How to do using vanilla.js or any other suggested method to hide the url hash so no history is generated; since, when clicking on a link in the menu, a history is generated, which when going back in the browser's search bar, goes through all the visited links until returning to the beginning and when refreshing the browser, it stays at the last link visited.
How do you transform this: http://myportafolio.com/#portafolio
into this: http://myportafolio.com/
without generating history when I visit an anchor within the same page?