Use of window.location doesn't work on iPad
22,629
try
location.href = "..."
, should work on both
Related videos on Youtube
Author by
LDJ
Updated on September 09, 2020Comments
-
LDJ over 3 years
I'm using some
JavaScript
that will redirect the user to anotherURL
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 callwindow.location = "www.someurl.com";
and I've also tried
window.location.href = "www.someurl.com";
I can see the
URL
in the browser changing towww.someurl.ocom
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?
Thanks
-
LDJ almost 11 yearsThanks - worked like a charm. Whats significant about window.location that iOS doesn't like?