Refresh webpage while also cleaning the url (remove #)

163 Views Asked by At

I have a hard to google question because I don't know the correct vocabulary. I'm using Impress.js to create a slideshow. When I navigate the slideshow, Impress automatically adds a # symbol and the name of the slide to the url.

So when I navigate to my page by typing

rootFolder/index.html 

into the browser, it automatically changes to

    rootFolder/index.html#/overview

and then when I move to the next slide it changes to

    rootFolder/index.html#/step-2

and so on.

This has become an annoying problem for development since I don't know how to refresh the page and start from the very beginning of the slideshow. If I click on the refresh button of the browser, it will still remember the hashtag and the step name in the url. So my question is this: Is there a way to refresh the page back to just index.html without the hashtag and the things that follow the hashtag? Or is my only option to keep clicking in the address bar to manually delete the added elements?

EDIT: While the old question you linked to is helpful because it provides some vocabulary, they are actually not trying to do what I want to do: I want to refresh my page and remove the # part, but in that question they are trying to remove the # part while avoiding a refresh. I'm also not trying to refresh programmatically but simply by clicking on the refresh button of the browser (to get new changes made to my source code to display).

0

There are 0 best solutions below