-
Feature Request
-
Resolution: Done
-
Major
-
4.1.0.Beta1
-
None
-
None
Cross-origin XMLHttpRequest send browser's default User Agent string in the request headers.
Steps to reproduce:
Create the following page in a hybrid project and open it with CordovaSim:
ua-test.html
<script> var client = new XMLHttpRequest(); client.onreadystatechange = function() { if(client.readyState == client.DONE) { if (client.status == 200) { alert(/<span id="body_lbUserAgent">([^>]*)<\/span>/ig.exec(client.responseText)[1]); } else { alert("Error code: " + client.status); } } } client.open("GET", "http://www.whatsmyuseragent.com/"); client.send(); </script>
Actual result:
A desktop User Agent is shown:
Expected result:
An iPhone User Agent is shown.