I have this function below to force reload the webpage when you run the file.
The thing is that the function it's supposed to work just once, but everytime I run it works twice.
Some help please with this function:
function forcedReload(){
if(!window.location.hash) {
window.location = window.location + '#';
window.location.reload(true);
}
}
As you can see, the function adds a # at the end of the URL when it's done, but instead of adding one adds two.
window.location = window.location + '#';- reloadswindow.location.reload(true);also reloadswindow.location.hash="#"- but what is the usecase???