Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
mobile-spec failure in XMLHttpRequest.spec.4 is a known WKWebView issue, where CORS is now respected and cannot load files from file:// urls, only http*:// urls are allowed.
With CSP off to rule things out:
XHR to yourself of course works, but doesn't really make sense for
real-world use. XHR to a sibling file, parent file, or any child file
results in the error ""Cross origin requests are only supported for
HTTP”.
To illustrate:
| parent.xml | www |---- index.html (file currently loaded) |---- sibling.xml |---- child-folder | |---- child.xml
index.html is the currently loaded file in the WebView. From it, you
can't load parent.xml, sibling.xml nor child.xml using XHR according
to my tests.
The workaround is implementing CB-10109
Attachments
Issue Links
- depends upon
-
CB-10109 Allow WKWebView to proxy file:// url loading in XmlHttpRequest.open
- Closed
- is depended upon by
-
CB-10145 HTMLImports is not working, rendering the webcomponents.js polyfill useless.
- Closed
- is duplicated by
-
CB-10144 You can't make cross-origin XmlHttpRequests in WKWebView
- Closed
-
CB-10532 jQuery.load() - Origin null is not allowed by Access-Control-Allow-Origin.
- Closed
-
CB-11567 IOS 9.3.2 (iPhone 6s) can't load file://
- Closed
-
CB-10109 Allow WKWebView to proxy file:// url loading in XmlHttpRequest.open
- Closed