URL- . JavaScript HTML :
history.replaceState('data to be passed', 'Title of the page', 'theNameWithoutTheHTML');
.js , script :
history.replaceState('data to be passed', 'Title of the page', location.pathname.slice(0, -5));
In this case, you are redirected to the .html file, this should not be a problem when the user reloads the page (since it will try to load the page without .html).
source
share