iPad 2 Safari redirect not working after updating to latest ios (8.1.1)

675 views Asked by At

We had a bug report regarding redirects in Safari not working which we couldn't reproduce. Today after updating to latest 8.1.1 version sure enough we're also stuck at the page where redirect should happen.

I tried clearing cache and history of Safari but it didn't help. Has anyone encountered the same problem or if anyone has an idea what could be wrong?

1

There are 1 answers

0
ConfusedAmish On

Ok I'm answering this for future use if anyone encounters the same problem. Apparently javacript properties outerWIdth and outerHeight are always set to 0 in Mobile Safari so if you have a code like this:

if(this.outerWidth == 0 || this.outerHeight == 0) {
  redirect();
}

redirect() will never happen in Mobile Safari (ios v8.1.1)