LDJ LDJ - 1 year ago 99
iOS Question

Use of window.location doesn't work on iPad

I'm using some

that will redirect the user to another
after a fixed period of time. This is working well on all browsers but on an iPad 3 I have to test on it isn't working. The timeout fires and I call

window.location = "www.someurl.com";

and I've also tried

window.location.href = "www.someurl.com";

I can see the
in the browser changing to
but the browser doesn't actually go there - it stays on the same page.

Is there something iPad specific I have to do to make this work?


Answer Source

try location.href = "...", should work on both

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download