I tried to change the link of the page changing it's window.location, but it just doesn't work

Viewed 37

I have a function with the following code:

window.location = window.location.origin;

and I've tried a lot of different ways of doing this, but they all just reload the page with the same link. The odd thing to me is that if I call this function from the console it all works out as it should, so I have no clue to where is the problem.

0 Answers
Related