XHR Doesn’t Return responseURL in iOS8

So you’ve been making ajax calls and everything is going great.

Your onSuccess message looks something like this:

[pastacode lang=”javascript” manual=”var%20onSuccess%20%3D%20function(data)%20%7B%0A%20%20%20%20console.log(data.xhr.responseURL)%0A%7D” message=”” highlight=”” provider=”manual”/]

All of a sudden your QA professional says things aren’t working in iOS8!

No prob, bob. It’s actually that iOS8 and below doesn’t return a “responseURL” attribute of the xhr object. Look at the difference:

iOS8 xhr object:

ios8

Everything else:

everything-else

Anyway…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.