When loading a restbase url that is a redirect, the request fails. Non-redirect urls seem to work fine.
Related task: T148368: Prototypes don't work on Safari
Info
- Device: Galaxy Nexus
- OS: Android 4.1.1
- UA: Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; Galaxy Nexus Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
SSCCE
<!DOCTYPE html> <html> <head> <meta name="description" content="mobile sections api call"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> <style> html, body, pre { width: 100%; height: 100%; } pre { overflow: auto; padding: 1em; } </style> </head> <body> <pre></pre> <script> var xhr = new XMLHttpRequest(); xhr.addEventListener("load", onLoad); xhr.addEventListener("error", setError); xhr.open('GET', 'https://en.wikipedia.beta.wmflabs.org/api/rest_v1/page/mobile-sections/User%3APchelolo%2FRedirect%20Test?redirect=true', true); xhr.send(null); function onLoad() { setJSON(JSON.parse(this.responseText)) } function setJSON (json) { document.querySelector('pre').innerHTML = JSON.stringify(json, null, 2) } function setError (e) { console.log(e) document.querySelector('pre').innerHTML = e.message + '\n' + e.stack } </script> </body> </html>