Redirecting to another web page does not work in mobile

I am doing a web page, and when testing it on mobile, it does not redirect successfully (from dropdown menu which is in “tanssityylit”). I found the hint to redirect from here:

But when I test it from my laptop (instead of smart phone), it redirects properly without a problem.

I am doing a school assignment, so the teacher should find my project as a link from a public space.

Any hints how to make it work and why it does not work right now?

Here is the front page:


instead of location.replace


make use of anchor tag directly as follows:
<a href="............" >Link</a>

1 Like

Ok thanks :sunny: That seems to work.


The location.assign() method loads a new document in the browser window.


When to use assign() and replace() method

The difference between assign() and replace() method is that the location.replace() method delete the current URL from document history, so it is unable to navigate back to the original document. You can’t use the browsers “Back” button in this case. If you want to avoid this situation, you should use location.assign() method, because it is load a new Document in browser. More on…url redirect